<?php
/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_DEFAULT_TCP_HOST', '127.0.0.1');

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_DEFAULT_TCP_PORT', 4730);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_DEFAULT_SOCKET_TIMEOUT', 10);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_DEFAULT_SOCKET_SEND_SIZE', 32768);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_DEFAULT_SOCKET_RECV_SIZE', 32768);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_MAX_ERROR_SIZE', 1024);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_PACKET_HEADER_SIZE', 12);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_JOB_HANDLE_SIZE', 64);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_OPTION_SIZE', 64);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_UNIQUE_SIZE', 64);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_MAX_COMMAND_ARGS', 8);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_ARGS_BUFFER_SIZE', 128);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_SEND_BUFFER_SIZE', 8192);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_RECV_BUFFER_SIZE', 8192);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_WORKER_WAIT_TIMEOUT', 10000);

/**
*       Whatever action was taken was successful.      
*/
define('GEARMAN_SUCCESS', 0);

/**
*       When in non-blocking mode, an event is hit that would have blocked.      
*/
define('GEARMAN_IO_WAIT', 1);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_SHUTDOWN', 2);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_SHUTDOWN_GRACEFUL', 3);

/**
*       A system error.  Check <span class="methodname"><strong>GearmanClient::errno()</strong></span> or       <span class="methodname"><strong>GearmanWorker::errno()</strong></span> for the system error code that       was returned.      
*/
define('GEARMAN_ERRNO', 4);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_EVENT', 5);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_TOO_MANY_ARGS', 6);

/**
*       <span class="methodname"><strong>GearmanClient::wait()</strong></span> or <span class="methodname"><strong>GearmanWorker()</strong></span> was       called with no connections.      
*/
define('GEARMAN_NO_ACTIVE_FDS', 7);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_INVALID_MAGIC', 8);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_INVALID_COMMAND', 9);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_INVALID_PACKET', 10);

/**
*       Indicates something going very wrong in gearmand.  Applies only to       <a href="http://php.net/manual/zh/class.gearmanworker.php" class="classname">GearmanWorker</a>.      
*/
define('GEARMAN_UNEXPECTED_PACKET', 11);

/**
*       DNS resolution failed (invalid host, port, etc).      
*/
define('GEARMAN_GETADDRINFO', 12);

/**
*       Did not call <span class="methodname">{@link GearmanClient::addServer()}</span> before submitting jobs       or tasks.      
*/
define('GEARMAN_NO_SERVERS', 13);

/**
*       Lost a connection during a request.      
*/
define('GEARMAN_LOST_CONNECTION', 14);

/**
*       Memory allocation failed (ran out of memory).      
*/
define('GEARMAN_MEMORY_ALLOCATION_FAILURE', 15);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_JOB_EXISTS', 16);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_JOB_QUEUE_FULL', 17);

/**
*       Something went wrong in the Gearman server and it could not handle the       request gracefully.      
*/
define('GEARMAN_SERVER_ERROR', 18);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_WORK_ERROR', 19);

/**
*       Notice return code obtained with <span class="methodname">{@link GearmanClient::returnCode()}</span>       when using <span class="methodname">{@link GearmanClient::do()}</span>.  Sent to update the client       with data from a running job.  A worker uses this when it needs to send updates,       send partial results, or flush data during long running jobs.      
*/
define('GEARMAN_WORK_DATA', 20);

/**
*       Notice return code obtained with <span class="methodname">{@link GearmanClient::returnCode()}</span>       when using <span class="methodname">{@link GearmanClient::do()}</span>.  Updates the client with       a warning.  The behavior is just like <strong><code>GEARMAN_WORK_DATA</code></strong>, but       should be treated as a warning instead of normal response data.      
*/
define('GEARMAN_WORK_WARNING', 21);

/**
*       Notice return code obtained with <span class="methodname">{@link GearmanClient::returnCode()}</span>       when using <span class="methodname">{@link GearmanClient::do()}</span>. Sent to update the status       of a long running job. Use <span class="methodname">{@link GearmanClient::doStatus()}</span> to obtain       the percentage complete of the task.      
*/
define('GEARMAN_WORK_STATUS', 22);

/**
*       Notice return code obtained with <span class="methodname">{@link GearmanClient::returnCode()}</span>       when using <span class="methodname">{@link GearmanClient::do()}</span>. Indicates that a job failed       with a given exception.      
*/
define('GEARMAN_WORK_EXCEPTION', 23);

/**
*       Notice return code obtained with <span class="methodname">{@link GearmanClient::returnCode()}</span>       when using <span class="methodname">{@link GearmanClient::do()}</span>. Indicates that the job failed.      
*/
define('GEARMAN_WORK_FAIL', 24);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_NOT_CONNECTED', 25);

/**
*       Failed to connect to servers.      
*/
define('GEARMAN_COULD_NOT_CONNECT', 26);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_SEND_IN_PROGRESS', 27);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_RECV_IN_PROGRESS', 28);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_NOT_FLUSHING', 29);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_DATA_TOO_LARGE', 30);

/**
*       Trying to register a function name of NULL or using the callback interface       without specifying callbacks.      
*/
define('GEARMAN_INVALID_FUNCTION_NAME', 31);

/**
*       Trying to register a function with a NULL callback function.      
*/
define('GEARMAN_INVALID_WORKER_FUNCTION', 32);

/**
*       When a worker gets a job for a function it did not register.      
*/
define('GEARMAN_NO_REGISTERED_FUNCTIONS', 34);

/**
*       For a non-blocking worker, when <span class="methodname">{@link GearmanWorker::work()}</span> does not have       any active jobs.      
*/
define('GEARMAN_NO_JOBS', 35);

/**
*       After <span class="methodname">{@link GearmanClient::echo()}</span> or <span class="methodname">{@link GearmanWorker::echo()}</span>       the data returned doesn&#039;t match the data sent.      
*/
define('GEARMAN_ECHO_DATA_CORRUPTION', 36);

/**
*       When the client opted to stream the workload of a task, but did not       specify a workload callback function.      
*/
define('GEARMAN_NEED_WORKLOAD_FN', 37);

/**
*       For the non-blocking client task interface, can be returned from the task callback       to &quot;pause&quot; the call and return from <span class="methodname">{@link GearmanClient::runTasks()}</span>.       Call <span class="methodname">{@link GearmanClient::runTasks()}</span> again to continue.      
*/
define('GEARMAN_PAUSE', 38);

/**
*       Internal client/worker state error.      
*/
define('GEARMAN_UNKNOWN_STATE', 39);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_PTHREAD', 40);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_PIPE_EOF', 41);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_QUEUE_ERROR', 42);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_FLUSH_DATA', 43);

/**
*       Internal error: trying to flush more data in one atomic chunk than is possible       due to hard-coded buffer sizes.      
*/
define('GEARMAN_SEND_BUFFER_TOO_SMALL', 44);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_IGNORE_PACKET', 45);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_UNKNOWN_OPTION', 46);

/**
*       Hit the timeout limit set by the client/worker.      
*/
define('GEARMAN_TIMEOUT', 47);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_MAX_RETURN', 49);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_VERBOSE_NEVER', 0);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_VERBOSE_FATAL', 1);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_VERBOSE_ERROR', 2);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_VERBOSE_INFO', 3);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_VERBOSE_DEBUG', 4);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_VERBOSE_CRAZY', 5);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_VERBOSE_MAX', 6);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_NON_BLOCKING', 0);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_DONT_TRACK_PACKETS', 1);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_CON_READY', 0);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_CON_PACKET_IN_USE', 1);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_CON_EXTERNAL_FD', 2);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_CON_IGNORE_LOST_CONNECTION', 3);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_CON_CLOSE_AFTER_FLUSH', 4);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_CON_SEND_STATE_NONE', 0);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_CON_RECV_STATE_READ_DATA', 2);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_MAGIC_TEXT', 0);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_MAGIC_REQUEST', 1);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_MAGIC_RESPONSE', 2);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_COMMAND_TEXT', 0);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_COMMAND_CAN_DO', 1);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_COMMAND_CANT_DO', 2);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_COMMAND_RESET_ABILITIES', 3);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_COMMAND_PRE_SLEEP', 4);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_COMMAND_UNUSED', 5);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_COMMAND_NOOP', 6);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_COMMAND_SUBMIT_JOB', 7);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_COMMAND_JOB_CREATED', 8);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_COMMAND_GRAB_JOB', 9);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_COMMAND_NO_JOB', 10);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_COMMAND_JOB_ASSIGN', 11);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_COMMAND_WORK_STATUS', 12);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_COMMAND_WORK_COMPLETE', 13);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_COMMAND_WORK_FAIL', 14);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_COMMAND_GET_STATUS', 15);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_COMMAND_ECHO_REQ', 16);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_COMMAND_ECHO_RES', 17);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_COMMAND_SUBMIT_JOB_BG', 18);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_COMMAND_ERROR', 19);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_COMMAND_STATUS_RES', 20);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_COMMAND_SUBMIT_JOB_HIGH', 21);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_COMMAND_SET_CLIENT_ID', 22);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_COMMAND_CAN_DO_TIMEOUT', 23);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_COMMAND_ALL_YOURS', 24);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_COMMAND_WORK_EXCEPTION', 25);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_COMMAND_OPTION_REQ', 26);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_COMMAND_OPTION_RES', 27);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_COMMAND_WORK_DATA', 28);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_COMMAND_WORK_WARNING', 29);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_COMMAND_GRAB_JOB_UNIQ', 30);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_COMMAND_JOB_ASSIGN_UNIQ', 31);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_COMMAND_SUBMIT_JOB_HIGH_BG', 32);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_COMMAND_SUBMIT_JOB_LOW', 33);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_COMMAND_SUBMIT_JOB_LOW_BG', 34);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_COMMAND_SUBMIT_JOB_SCHED', 35);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_COMMAND_SUBMIT_JOB_EPOCH', 36);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_COMMAND_MAX', 37);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_TASK_STATE_NEW', 0);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_TASK_STATE_SUBMIT', 1);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_TASK_STATE_WORKLOAD', 2);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_TASK_STATE_WORK', 3);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_TASK_STATE_CREATED', 4);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_TASK_STATE_DATA', 5);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_TASK_STATE_WARNING', 6);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_TASK_STATE_STATUS', 7);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_TASK_STATE_COMPLETE', 8);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_TASK_STATE_EXCEPTION', 9);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_TASK_STATE_FAIL', 10);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_TASK_STATE_FINISHED', 11);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_JOB_PRIORITY_HIGH', 0);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_JOB_PRIORITY_NORMAL', 1);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_JOB_PRIORITY_LOW', 2);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_JOB_PRIORITY_MAX', 3);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_CLIENT_ALLOCATED', 1);

/**
*       Run the cient in a non-blocking mode.      
*/
define('GEARMAN_CLIENT_NON_BLOCKING', 2);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_CLIENT_TASK_IN_USE', 4);

/**
*       Allow the client to read data in chunks rather than have the library       buffer the entire data result and pass that back.      
*/
define('GEARMAN_CLIENT_UNBUFFERED_RESULT', 8);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_CLIENT_NO_NEW', 16);

/**
*       Automatically free task objects once they are complete.  This is the default       setting in this extension to prevent memory leaks.      
*/
define('GEARMAN_CLIENT_FREE_TASKS', 32);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_CLIENT_STATE_IDLE', 0);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_CLIENT_STATE_NEW', 1);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_CLIENT_STATE_SUBMIT', 2);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_CLIENT_STATE_PACKET', 3);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_WORKER_ALLOCATED', 1);

/**
*       Run the worker in non-blocking mode.      
*/
define('GEARMAN_WORKER_NON_BLOCKING', 2);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_WORKER_PACKET_INIT', 4);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_WORKER_GRAB_JOB_IN_USE', 8);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_WORKER_PRE_SLEEP_IN_USE', 16);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_WORKER_WORK_JOB_IN_USE', 32);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_WORKER_CHANGE', 64);

/**
*       Return the client assigned unique ID in addition to the job handle.      
*/
define('GEARMAN_WORKER_GRAB_UNIQ', 128);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_WORKER_TIMEOUT_RETURN', 256);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_WORKER_STATE_START', 0);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_WORKER_STATE_FUNCTION_SEND', 1);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_WORKER_STATE_CONNECT', 2);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_WORKER_STATE_GRAB_JOB_SEND', 3);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_WORKER_STATE_GRAB_JOB_RECV', 4);

/**
 * @link http://php.net/manual/en/gearman.constants.php
 */
define('GEARMAN_WORKER_STATE_PRE_SLEEP', 5);


/**
 */
function gearman_version() {}

/**
 */
function gearman_bugreport() {}

/**
 * @param $verbose
 */
function gearman_verbose_name($verbose) {}

/**
 * @param $client_object
 */
function gearman_client_return_code($client_object) {}

/**
 * @param $client_object
 */
function gearman_client_create($client_object) {}

/**
 * @param $client_object
 */
function gearman_client_clone($client_object) {}

/**
 * @param $client_object
 */
function gearman_client_error($client_object) {}

/**
 * @param $client_object
 */
function gearman_client_errno($client_object) {}

/**
 * @param $client_object
 */
function gearman_client_options($client_object) {}

/**
 * @param $client_object
 * @param $option
 */
function gearman_client_set_options($client_object, $option) {}

/**
 * @param $client_object
 * @param $option
 */
function gearman_client_add_options($client_object, $option) {}

/**
 * @param $client_object
 * @param $option
 */
function gearman_client_remove_options($client_object, $option) {}

/**
 * @param $client_object
 */
function gearman_client_timeout($client_object) {}

/**
 * @param $client_object
 * @param $timeout
 */
function gearman_client_set_timeout($client_object, $timeout) {}

/**
 * @param $client_object
 */
function gearman_client_context($client_object) {}

/**
 * @param $client_object
 * @param $context
 */
function gearman_client_set_context($client_object, $context) {}

/**
 * @param $client_object
 * @param $host
 * @param $port
 */
function gearman_client_add_server($client_object, $host, $port) {}

/**
 * @param $client_object
 * @param $servers
 */
function gearman_client_add_servers($client_object, $servers) {}

/**
 * @param $client_object
 */
function gearman_client_wait($client_object) {}

/**
 * @param $client_object
 * @param $function_name
 * @param $workload
 * @param $unique
 */
function gearman_client_do($client_object, $function_name, $workload, $unique) {}

/**
 * @param $client_object
 * @param $function_name
 * @param $workload
 * @param $unique
 */
function gearman_client_do_high($client_object, $function_name, $workload, $unique) {}

/**
 * @param $client_object
 * @param string $function_name
 * @param string $workload
 * @param string $unique
 */
function gearman_client_do_normal($client_object, $function_name, $workload, $unique) {}

/**
 * @param $client_object
 * @param $function_name
 * @param $workload
 * @param $unique
 */
function gearman_client_do_low($client_object, $function_name, $workload, $unique) {}

/**
 * @param $client_object
 */
function gearman_client_do_job_handle($client_object) {}

/**
 * @param $client_object
 */
function gearman_client_do_status($client_object) {}

/**
 * @param $client_object
 * @param $function_name
 * @param $workload
 * @param $unique
 */
function gearman_client_do_background($client_object, $function_name, $workload, $unique) {}

/**
 * @param $client_object
 * @param $function_name
 * @param $workload
 * @param $unique
 */
function gearman_client_do_high_background($client_object, $function_name, $workload, $unique) {}

/**
 * @param $client_object
 * @param $function_name
 * @param $workload
 * @param $unique
 */
function gearman_client_do_low_background($client_object, $function_name, $workload, $unique) {}

/**
 * @param $client_object
 * @param $job_handle
 */
function gearman_client_job_status($client_object, $job_handle) {}

/**
 * @param $client_object
 * @param $workload
 */
function gearman_client_echo($client_object, $workload) {}

/**
 * @param $client_object
 * @param $function_name
 * @param $workload
 * @param $context
 * @param $unique
 */
function gearman_client_add_task($client_object, $function_name, $workload, $context, $unique) {}

/**
 * @param $client_object
 * @param $function_name
 * @param $workload
 * @param $context
 * @param $unique
 */
function gearman_client_add_task_high($client_object, $function_name, $workload, $context, $unique) {}

/**
 * @param $client_object
 * @param $function_name
 * @param $workload
 * @param $context
 * @param $unique
 */
function gearman_client_add_task_low($client_object, $function_name, $workload, $context, $unique) {}

/**
 * @param $client_object
 * @param $function_name
 * @param $workload
 * @param $context
 * @param $unique
 */
function gearman_client_add_task_background($client_object, $function_name, $workload, $context, $unique) {}

/**
 * @param $client_object
 * @param $function_name
 * @param $workload
 * @param $context
 * @param $unique
 */
function gearman_client_add_task_high_background($client_object, $function_name, $workload, $context, $unique) {}

/**
 * @param $client_object
 * @param $function_name
 * @param $workload
 * @param $context
 * @param $unique
 */
function gearman_client_add_task_low_background($client_object, $function_name, $workload, $context, $unique) {}

/**
 * @param $client_object
 * @param $job_handle
 * @param $context
 */
function gearman_client_add_task_status($client_object, $job_handle, $context) {}

/**
 * @param $client_object
 * @param $callback
 */
function gearman_client_set_workload_fn($client_object, $callback) {}

/**
 * @param $client_object
 * @param $callback
 */
function gearman_client_set_created_fn($client_object, $callback) {}

/**
 * @param $client_object
 * @param $callback
 */
function gearman_client_set_data_fn($client_object, $callback) {}

/**
 * @param $client_object
 * @param $callback
 */
function gearman_client_set_warning_fn($client_object, $callback) {}

/**
 * @param $client_object
 * @param $callback
 */
function gearman_client_set_status_fn($client_object, $callback) {}

/**
 * @param $client_object
 * @param $callback
 */
function gearman_client_set_complete_fn($client_object, $callback) {}

/**
 * @param $client_object
 * @param $callback
 */
function gearman_client_set_exception_fn($client_object, $callback) {}

/**
 * @param $client_object
 * @param $callback
 */
function gearman_client_set_fail_fn($client_object, $callback) {}

/**
 * @param $client_object
 */
function gearman_client_clear_fn($client_object) {}

/**
 * @param $data
 */
function gearman_client_run_tasks($data) {}

/**
 * @param $task_object
 */
function gearman_task_return_code($task_object) {}

/**
 * @param $task_object
 */
function gearman_task_function_name($task_object) {}

/**
 * @param $task_object
 */
function gearman_task_unique($task_object) {}

/**
 * @param $task_object
 */
function gearman_task_job_handle($task_object) {}

/**
 * @param $task_object
 */
function gearman_task_is_known($task_object) {}

/**
 * @param $task_object
 */
function gearman_task_is_running($task_object) {}

/**
 * @param $task_object
 */
function gearman_task_numerator($task_object) {}

/**
 * @param $task_object
 */
function gearman_task_denominator($task_object) {}

/**
 * @param $task_object
 * @param $data
 */
function gearman_task_send_workload($task_object, $data) {}

/**
 * @param $task_object
 */
function gearman_task_data($task_object) {}

/**
 * @param $task_object
 */
function gearman_task_data_size($task_object) {}

/**
 * @param $task_object
 * @param $data_len
 */
function gearman_task_recv_data($task_object, $data_len) {}

/**
 * @param $worker_object
 */
function gearman_worker_return_code($worker_object) {}

/**
 */
function gearman_worker_create() {}

/**
 * @param $worker_object
 */
function gearman_worker_clone($worker_object) {}

/**
 * @param $worker_object
 */
function gearman_worker_error($worker_object) {}

/**
 * @param $worker_object
 */
function gearman_worker_errno($worker_object) {}

/**
 * @param $worker_object
 */
function gearman_worker_options($worker_object) {}

/**
 * @param $worker_object
 * @param $option
 */
function gearman_worker_set_options($worker_object, $option) {}

/**
 * @param $worker_object
 * @param $option
 */
function gearman_worker_add_options($worker_object, $option) {}

/**
 * @param $worker_object
 * @param $option
 */
function gearman_worker_remove_options($worker_object, $option) {}

/**
 * @param $worker_object
 */
function gearman_worker_timeout($worker_object) {}

/**
 * @param $worker_object
 * @param $timeout
 */
function gearman_worker_set_timeout($worker_object, $timeout) {}

/**
 * @param $worker_object
 * @param $host
 * @param $port
 */
function gearman_worker_add_server($worker_object, $host, $port) {}

/**
 * @param $worker_object
 * @param $servers
 */
function gearman_worker_add_servers($worker_object, $servers) {}

/**
 * @param $worker_object
 */
function gearman_worker_wait($worker_object) {}

/**
 * @param $worker_object
 * @param $function_name
 * @param $timeout
 */
function gearman_worker_register($worker_object, $function_name, $timeout) {}

/**
 * @param $worker_object
 * @param $function_name
 */
function gearman_worker_unregister($worker_object, $function_name) {}

/**
 * @param $worker_object
 */
function gearman_worker_unregister_all($worker_object) {}

/**
 * @param $worker_object
 */
function gearman_worker_grab_job($worker_object) {}

/**
 * @param $worker_object
 * @param $function_name
 * @param $function
 * @param $data
 * @param $timeout
 */
function gearman_worker_add_function($worker_object, $function_name, $function, $data, $timeout) {}

/**
 * @param $worker_object
 */
function gearman_worker_work($worker_object) {}

/**
 * @param $worker_object
 * @param $workload
 */
function gearman_worker_echo($worker_object, $workload) {}

/**
 * @param $job_object
 */
function gearman_job_return_code($job_object) {}

/**
 * @param $job_object
 * @param $data
 */
function gearman_job_send_data($job_object, $data) {}

/**
 * @param $job_object
 * @param $warning
 */
function gearman_job_send_warning($job_object, $warning) {}

/**
 * @param $job_object
 * @param $numerator
 * @param $denominator
 */
function gearman_job_send_status($job_object, $numerator, $denominator) {}

/**
 * @param $job_object
 * @param $result
 */
function gearman_job_send_complete($job_object, $result) {}

/**
 * @param $job_object
 * @param $exception
 */
function gearman_job_send_exception($job_object, $exception) {}

/**
 * @param $job_object
 */
function gearman_job_send_fail($job_object) {}

/**
 * @param $job_object
 */
function gearman_job_handle($job_object) {}

/**
 * @param $job_object
 */
function gearman_job_function_name($job_object) {}

/**
 * @param $job_object
 */
function gearman_job_unique($job_object) {}

/**
 * @param $job_object
 */
function gearman_job_workload($job_object) {}

/**
 * @param $job_object
 */
function gearman_job_workload_size($job_object) {}



/**
*<div id="class.gearmanclient" class="reference">   <h1 class="title">The GearmanClient class</h1>     <div class="partintro"><p class="verinfo">(PECL gearman &gt;= 0.5.0)</p>     <div class="section" id="gearmanclient.intro">    <h2 class="title">简介</h2>    <p class="para">     Represents a class for connecting to a Gearman job server and making requests to perform     some function on provided data.  The function performed must be one registered by a Gearman     worker and the data passed is opaque to the job server.    </p>   </div>     <div class="section" id="gearmanclient.synopsis">    <h2 class="title">类摘要</h2>      <div class="classsynopsis">     <div class="ooclass"></div>       <div class="classsynopsisinfo">      <span class="ooclass">       <strong class="classname">GearmanClient</strong>      </span>      {</div>           <div class="classsynopsisinfo classsynopsisinfo_comment">// 方法 </div>     <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">bool</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmanclient.addoptions.php" class="methodname" style="color:#CC7832">addOptions</a></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$options</span></span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">bool</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmanclient.addserver.php" class="methodname" style="color:#CC7832">addServer</a></span>     ([ <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$host</span><span class="initializer"> = 127.0.0.1</span></span>    [, <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$port</span><span class="initializer"> = 4730</span></span>   ]] )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">bool</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmanclient.addservers.php" class="methodname" style="color:#CC7832">addServers</a></span>     ([ <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$servers</span><span class="initializer"> = 127.0.0.1:4730</span></span>   ] )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">GearmanTask</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmanclient.addtask.php" class="methodname" style="color:#CC7832">addTask</a></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$function_name</span></span>    , <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$workload</span></span>    [, <span class="methodparam"><span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/language.pseudo-types.php#language.types.mixed" class="type mixed" style="color:#EAB766">mixed</a></span> <span class="parameter" style="color:#2EACF9">&$context</span></span>    [, <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$unique</span></span>   ]] )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">GearmanTask</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmanclient.addtaskbackground.php" class="methodname" style="color:#CC7832">addTaskBackground</a></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$function_name</span></span>    , <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$workload</span></span>    [, <span class="methodparam"><span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/language.pseudo-types.php#language.types.mixed" class="type mixed" style="color:#EAB766">mixed</a></span> <span class="parameter" style="color:#2EACF9">&$context</span></span>    [, <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$unique</span></span>   ]] )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">GearmanTask</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmanclient.addtaskhigh.php" class="methodname" style="color:#CC7832">addTaskHigh</a></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$function_name</span></span>    , <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$workload</span></span>    [, <span class="methodparam"><span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/language.pseudo-types.php#language.types.mixed" class="type mixed" style="color:#EAB766">mixed</a></span> <span class="parameter" style="color:#2EACF9">&$context</span></span>    [, <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$unique</span></span>   ]] )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">GearmanTask</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmanclient.addtaskhighbackground.php" class="methodname" style="color:#CC7832">addTaskHighBackground</a></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$function_name</span></span>    , <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$workload</span></span>    [, <span class="methodparam"><span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/language.pseudo-types.php#language.types.mixed" class="type mixed" style="color:#EAB766">mixed</a></span> <span class="parameter" style="color:#2EACF9">&$context</span></span>    [, <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$unique</span></span>   ]] )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">GearmanTask</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmanclient.addtasklow.php" class="methodname" style="color:#CC7832">addTaskLow</a></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$function_name</span></span>    , <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$workload</span></span>    [, <span class="methodparam"><span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/language.pseudo-types.php#language.types.mixed" class="type mixed" style="color:#EAB766">mixed</a></span> <span class="parameter" style="color:#2EACF9">&$context</span></span>    [, <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$unique</span></span>   ]] )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">GearmanTask</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmanclient.addtasklowbackground.php" class="methodname" style="color:#CC7832">addTaskLowBackground</a></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$function_name</span></span>    , <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$workload</span></span>    [, <span class="methodparam"><span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/language.pseudo-types.php#language.types.mixed" class="type mixed" style="color:#EAB766">mixed</a></span> <span class="parameter" style="color:#2EACF9">&$context</span></span>    [, <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$unique</span></span>   ]] )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">GearmanTask</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmanclient.addtaskstatus.php" class="methodname" style="color:#CC7832">addTaskStatus</a></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$job_handle</span></span>    [, <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">&$context</span></span>   ] )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">bool</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmanclient.clearcallbacks.php" class="methodname" style="color:#CC7832">clearCallbacks</a></span>     ( <span class="methodparam">void</span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">GearmanClient</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmanclient.clone.php" class="methodname" style="color:#CC7832">clone</a></span>     ( <span class="methodparam">void</span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmanclient.construct.php" class="methodname" style="color:#CC7832">__construct</a></span>     ( <span class="methodparam">void</span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">string</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmanclient.context.php" class="methodname" style="color:#CC7832">context</a></span>     ( <span class="methodparam">void</span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">string</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmanclient.data.php" class="methodname" style="color:#CC7832">data</a></span>     ( <span class="methodparam">void</span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">string</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmanclient.do.php" class="methodname" style="color:#CC7832">do</a></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$function_name</span></span>    , <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$workload</span></span>    [, <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$unique</span></span>   ] )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">string</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmanclient.dobackground.php" class="methodname" style="color:#CC7832">doBackground</a></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$function_name</span></span>    , <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$workload</span></span>    [, <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$unique</span></span>   ] )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">string</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmanclient.dohigh.php" class="methodname" style="color:#CC7832">doHigh</a></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$function_name</span></span>    , <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$workload</span></span>    [, <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$unique</span></span>   ] )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">string</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmanclient.dohighbackground.php" class="methodname" style="color:#CC7832">doHighBackground</a></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$function_name</span></span>    , <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$workload</span></span>    [, <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$unique</span></span>   ] )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">string</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmanclient.dojobhandle.php" class="methodname" style="color:#CC7832">doJobHandle</a></span>     ( <span class="methodparam">void</span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">string</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmanclient.dolow.php" class="methodname" style="color:#CC7832">doLow</a></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$function_name</span></span>    , <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$workload</span></span>    [, <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$unique</span></span>   ] )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">string</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmanclient.dolowbackground.php" class="methodname" style="color:#CC7832">doLowBackground</a></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$function_name</span></span>    , <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$workload</span></span>    [, <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$unique</span></span>   ] )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">string</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmanclient.donormal.php" class="methodname" style="color:#CC7832">doNormal</a></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$function_name</span></span>    , <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$workload</span></span>    [, <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$unique</span></span>   ] )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">array</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmanclient.dostatus.php" class="methodname" style="color:#CC7832">doStatus</a></span>     ( <span class="methodparam">void</span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">bool</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmanclient.echo.php" class="methodname" style="color:#CC7832">echo</a></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$workload</span></span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">string</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmanclient.error.php" class="methodname" style="color:#CC7832">error</a></span>     ( <span class="methodparam">void</span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">int</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmanclient.geterrno.php" class="methodname" style="color:#CC7832">getErrno</a></span>     ( <span class="methodparam">void</span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">array</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmanclient.jobstatus.php" class="methodname" style="color:#CC7832">jobStatus</a></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$job_handle</span></span>     )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">bool</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmanclient.ping.php" class="methodname" style="color:#CC7832">ping</a></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$workload</span></span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">bool</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmanclient.removeoptions.php" class="methodname" style="color:#CC7832">removeOptions</a></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$options</span></span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">int</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmanclient.returncode.php" class="methodname" style="color:#CC7832">returnCode</a></span>     ( <span class="methodparam">void</span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">bool</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmanclient.runtasks.php" class="methodname" style="color:#CC7832">runTasks</a></span>     ( <span class="methodparam">void</span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">void</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmanclient.setclientcallback.php" class="methodname" style="color:#CC7832">setClientCallback</a></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/language.types.callable.php" class="type callable" style="color:#EAB766">callable</a></span> <span class="parameter" style="color:#2EACF9">$callback</span></span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">bool</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmanclient.setcompletecallback.php" class="methodname" style="color:#CC7832">setCompleteCallback</a></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/language.types.callable.php" class="type callable" style="color:#EAB766">callable</a></span> <span class="parameter" style="color:#2EACF9">$callback</span></span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">bool</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmanclient.setcontext.php" class="methodname" style="color:#CC7832">setContext</a></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$context</span></span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">bool</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmanclient.setcreatedcallback.php" class="methodname" style="color:#CC7832">setCreatedCallback</a></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$callback</span></span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">bool</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmanclient.setdata.php" class="methodname" style="color:#CC7832">setData</a></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$data</span></span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">bool</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmanclient.setdatacallback.php" class="methodname" style="color:#CC7832">setDataCallback</a></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/language.types.callable.php" class="type callable" style="color:#EAB766">callable</a></span> <span class="parameter" style="color:#2EACF9">$callback</span></span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">bool</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmanclient.setexceptioncallback.php" class="methodname" style="color:#CC7832">setExceptionCallback</a></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/language.types.callable.php" class="type callable" style="color:#EAB766">callable</a></span> <span class="parameter" style="color:#2EACF9">$callback</span></span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">bool</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmanclient.setfailcallback.php" class="methodname" style="color:#CC7832">setFailCallback</a></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/language.types.callable.php" class="type callable" style="color:#EAB766">callable</a></span> <span class="parameter" style="color:#2EACF9">$callback</span></span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">bool</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmanclient.setoptions.php" class="methodname" style="color:#CC7832">setOptions</a></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$options</span></span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">bool</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmanclient.setstatuscallback.php" class="methodname" style="color:#CC7832">setStatusCallback</a></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/language.types.callable.php" class="type callable" style="color:#EAB766">callable</a></span> <span class="parameter" style="color:#2EACF9">$callback</span></span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">bool</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmanclient.settimeout.php" class="methodname" style="color:#CC7832">setTimeout</a></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$timeout</span></span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">bool</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmanclient.setwarningcallback.php" class="methodname" style="color:#CC7832">setWarningCallback</a></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/language.types.callable.php" class="type callable" style="color:#EAB766">callable</a></span> <span class="parameter" style="color:#2EACF9">$callback</span></span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">bool</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmanclient.setworkloadcallback.php" class="methodname" style="color:#CC7832">setWorkloadCallback</a></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/language.types.callable.php" class="type callable" style="color:#EAB766">callable</a></span> <span class="parameter" style="color:#2EACF9">$callback</span></span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">int</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmanclient.timeout.php" class="methodname" style="color:#CC7832">timeout</a></span>     ( <span class="methodparam">void</span>    )</div>     }</div>     </div>   </div>                                                                                                                                                                                                                                                                                                                                       <h2>Table of Contents</h2><ul class="chunklist chunklist_reference"><li>{@link GearmanClient::addOptions} — Add client options</li><li>{@link GearmanClient::addServer} — Add a job server to the client</li><li>{@link GearmanClient::addServers} — Add a list of job servers to the client</li><li>{@link GearmanClient::addTask} — Add a task to be run in parallel</li><li>{@link GearmanClient::addTaskBackground} — Add a background task to be run in parallel</li><li>{@link GearmanClient::addTaskHigh} — Add a high priority task to run in parallel</li><li>{@link GearmanClient::addTaskHighBackground} — Add a high priority background task to be run in parallel</li><li>{@link GearmanClient::addTaskLow} — Add a low priority task to run in parallel</li><li>{@link GearmanClient::addTaskLowBackground} — Add a low priority background task to be run in parallel</li><li>{@link GearmanClient::addTaskStatus} — Add a task to get status</li><li>{@link GearmanClient::clearCallbacks} — Clear all task callback functions</li><li>{@link GearmanClient::clone} — Create a copy of a GearmanClient object</li><li>{@link GearmanClient::__construct} — Create a GearmanClient instance</li><li>{@link GearmanClient::context} — Get the application context</li><li>{@link GearmanClient::data} — Get the application data (deprecated)</li><li>{@link GearmanClient::do} — Run a single task and return a result [deprecated]</li><li>{@link GearmanClient::doBackground} — Run a task in the background</li><li>{@link GearmanClient::doHigh} — Run a single high priority task</li><li>{@link GearmanClient::doHighBackground} — Run a high priority task in the background</li><li>{@link GearmanClient::doJobHandle} — Get the job handle for the running task</li><li>{@link GearmanClient::doLow} — Run a single low priority task</li><li>{@link GearmanClient::doLowBackground} — Run a low priority task in the background</li><li>{@link GearmanClient::doNormal} — Run a single task and return a result</li><li>{@link GearmanClient::doStatus} — Get the status for the running task</li><li>{@link GearmanClient::echo} — Send data to all job servers to see if they echo it back [deprecated]</li><li>{@link GearmanClient::error} — Returns an error string for the last error encountered</li><li>{@link GearmanClient::getErrno} — Get an errno value</li><li>{@link GearmanClient::jobStatus} — Get the status of a background job</li><li>{@link GearmanClient::ping} — Send data to all job servers to see if they echo it back</li><li>{@link GearmanClient::removeOptions} — Remove client options</li><li>{@link GearmanClient::returnCode} — Get the last Gearman return code</li><li>{@link GearmanClient::runTasks} — Run a list of tasks in parallel</li><li>{@link GearmanClient::setClientCallback} — Callback function when there is a data packet for a task (deprecated)</li><li>{@link GearmanClient::setCompleteCallback} — Set a function to be called on task completion</li><li>{@link GearmanClient::setContext} — Set application context</li><li>{@link GearmanClient::setCreatedCallback} — Set a callback for when a task is queued</li><li>{@link GearmanClient::setData} — Set application data (deprecated)</li><li>{@link GearmanClient::setDataCallback} — Callback function when there is a data packet for a task</li><li>{@link GearmanClient::setExceptionCallback} — Set a callback for worker exceptions</li><li>{@link GearmanClient::setFailCallback} — Set callback for job failure</li><li>{@link GearmanClient::setOptions} — Set client options</li><li>{@link GearmanClient::setStatusCallback} — Set a callback for collecting task status</li><li>{@link GearmanClient::setTimeout} — Set socket I/O activity timeout</li><li>{@link GearmanClient::setWarningCallback} — Set a callback for worker warnings</li><li>{@link GearmanClient::setWorkloadCallback} — Set a callback for accepting incremental data updates</li><li>{@link GearmanClient::timeout} — Get current socket I/O activity timeout value</li></ul> <div class="up"><a href="http://php.net/manual/zh/book.gearman.php">Gearman</a></div></div>
*/
class GearmanClient {
    /**
     * Creates a GearmanClient instance representing a client that connects to the job
     * server and submits tasks to complete.
     *
     * @link http://php.net/manual/en/gearmanclient.construct.php
     * @return  A GearmanClient object
     */
    public function __construct() {}

/**
*<div id="gearmanclient.returncode" class="refentry">  <div class="refnamediv">   <h1 class="refname">GearmanClient::returnCode</h1>   <p class="verinfo">(PECL gearman &gt;= 0.5.0)</p><p class="refpurpose"><span class="refname">GearmanClient::returnCode</span> &mdash; <span class="dc-title">Get the last Gearman return code</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-gearmanclient.returncode-description">   <h3 class="title">说明</h3>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">int</span> <span class="methodname" style="color:#CC7832"><strong>GearmanClient::returnCode</strong></span>     ( <span class="methodparam">void</span>    )</div>    <p class="para rdfs-comment">    Returns the last Gearman return code.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-gearmanclient.returncode-parameters">   <h3 class="title">参数</h3>   <span>此函数没有参数。</span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-gearmanclient.returncode-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    A valid Gearman return code.   </p>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.gearmanclient.php">GearmanClient</a></div></div>
     * @return int A valid Gearman return code*/
    public function returnCode() {}

/**
*<div id="gearmanclient.error" class="refentry">  <div class="refnamediv">   <h1 class="refname">GearmanClient::error</h1>   <p class="verinfo">(PECL gearman &gt;= 0.5.0)</p><p class="refpurpose"><span class="refname">GearmanClient::error</span> &mdash; <span class="dc-title">Returns an error string for the last error encountered</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-gearmanclient.error-description">   <h3 class="title">说明</h3>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">string</span> <span class="methodname" style="color:#CC7832"><strong>GearmanClient::error</strong></span>     ( <span class="methodparam">void</span>    )</div>    <p class="para rdfs-comment">    Returns an error string for the last error encountered.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-gearmanclient.error-parameters">   <h3 class="title">参数</h3>   <span>此函数没有参数。</span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-gearmanclient.error-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    A human readable error string.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 seealso" id="refsect1-gearmanclient.error-seealso">   <h3 class="title">参见</h3>   <span>    <ul class="simplelist">     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::getErrno()} - Get an errno value</span></li>    </ul>   </span>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.gearmanclient.php">GearmanClient</a></div></div>
     * @return string A human readable error string*/
    public function error() {}

/**
*<div id="gearmanclient.geterrno" class="refentry">  <div class="refnamediv">   <h1 class="refname">GearmanClient::getErrno</h1>   <p class="verinfo">(PECL gearman &gt;= 0.5.0)</p><p class="refpurpose"><span class="refname">GearmanClient::getErrno</span> &mdash; <span class="dc-title">Get an errno value</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-gearmanclient.geterrno-description">   <h3 class="title">说明</h3>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">int</span> <span class="methodname" style="color:#CC7832"><strong>GearmanClient::getErrno</strong></span>     ( <span class="methodparam">void</span>    )</div>    <p class="para rdfs-comment">    Value of errno in the case of a GEARMAN_ERRNO return value.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-gearmanclient.geterrno-parameters">   <h3 class="title">参数</h3>   <span>此函数没有参数。</span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-gearmanclient.geterrno-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    A valid Gearman errno.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 seealso" id="refsect1-gearmanclient.geterrno-seealso">   <h3 class="title">参见</h3>   <span>    <ul class="simplelist">     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::error()} - Returns an error string for the last error encountered</span></li>    </ul>   </span>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.gearmanclient.php">GearmanClient</a></div></div>
     * @return int A valid Gearman errno*/
    public function getErrno() {}

    /**
       */
    public function options() {}

/**
*<div id="gearmanclient.setoptions" class="refentry">  <div class="refnamediv">   <h1 class="refname">GearmanClient::setOptions</h1>   <p class="verinfo">(PECL gearman &gt;= 0.5.0)</p><p class="refpurpose"><span class="refname">GearmanClient::setOptions</span> &mdash; <span class="dc-title">Set client options</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-gearmanclient.setoptions-description">   <h3 class="title">说明</h3>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">bool</span> <span class="methodname" style="color:#CC7832"><strong>GearmanClient::setOptions</strong></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$options</span></span>    )</div>    <p class="para rdfs-comment">    Sets one or more client options.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-gearmanclient.setoptions-parameters">   <h3 class="title">参数</h3>   <span>    <dl>            <dt> <span class="parameter" style="color:#2EACF9">options</span></dt>       <dd>        <p class="para">        The options to be set       </p>      </dd>          </dl>    </span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-gearmanclient.setoptions-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    Always returns <strong><span>TRUE</span></strong>.   </p>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.gearmanclient.php">GearmanClient</a></div></div>
     * @return bool Always returns true*/
    public function setOptions($options) {}

/**
*<div id="gearmanclient.addoptions" class="refentry">  <div class="refnamediv">   <h1 class="refname">GearmanClient::addOptions</h1>   <p class="verinfo">(PECL gearman &gt;= 0.6.0)</p><p class="refpurpose"><span class="refname">GearmanClient::addOptions</span> &mdash; <span class="dc-title">Add client options</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-gearmanclient.addoptions-description">   <h3 class="title">说明</h3>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">bool</span> <span class="methodname" style="color:#CC7832"><strong>GearmanClient::addOptions</strong></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$options</span></span>    )</div>    <p class="para rdfs-comment">    Adds one or more options to those already set.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-gearmanclient.addoptions-parameters">   <h3 class="title">参数</h3>   <span>    <dl>            <dt> <span class="parameter" style="color:#2EACF9">options</span></dt>       <dd>        <p class="para">        The options to add.        One of the following constants, or a combination of        them using the bitwise OR operator ("<span class="quote">|</span>"):        <strong><span>GEARMAN_CLIENT_GENERATE_UNIQUE</span></strong>,        <strong><span>GEARMAN_CLIENT_NON_BLOCKING</span></strong>,        <strong><span>GEARMAN_CLIENT_UNBUFFERED_RESULT</span></strong> or        <strong><span>GEARMAN_CLIENT_FREE_TASKS</span></strong>.       </p>      </dd>          </dl>    </span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-gearmanclient.addoptions-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    Always returns <strong><span>TRUE</span></strong>.   </p>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.gearmanclient.php">GearmanClient</a></div></div>
     * @return bool Always returns true*/
    public function addOptions($options) {}

/**
*<div id="gearmanclient.removeoptions" class="refentry">  <div class="refnamediv">   <h1 class="refname">GearmanClient::removeOptions</h1>   <p class="verinfo">(PECL gearman &gt;= 0.6.0)</p><p class="refpurpose"><span class="refname">GearmanClient::removeOptions</span> &mdash; <span class="dc-title">Remove client options</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-gearmanclient.removeoptions-description">   <h3 class="title">说明</h3>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">bool</span> <span class="methodname" style="color:#CC7832"><strong>GearmanClient::removeOptions</strong></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$options</span></span>    )</div>    <p class="para rdfs-comment">    Removes (unsets) one or more options.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-gearmanclient.removeoptions-parameters">   <h3 class="title">参数</h3>   <span>    <dl>            <dt> <span class="parameter" style="color:#2EACF9">options</span></dt>       <dd>        <p class="para">        The options to be removed (unset)       </p>      </dd>          </dl>    </span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-gearmanclient.removeoptions-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    Always returns <strong><span>TRUE</span></strong>.   </p>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.gearmanclient.php">GearmanClient</a></div></div>
     * @return bool Always returns true*/
    public function removeOptions($options) {}

/**
*<div id="gearmanclient.timeout" class="refentry">  <div class="refnamediv">   <h1 class="refname">GearmanClient::timeout</h1>   <p class="verinfo">(PECL gearman &gt;= 0.6.0)</p><p class="refpurpose"><span class="refname">GearmanClient::timeout</span> &mdash; <span class="dc-title">Get current socket I/O activity timeout value</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-gearmanclient.timeout-description">   <h3 class="title">说明</h3>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">int</span> <span class="methodname" style="color:#CC7832"><strong>GearmanClient::timeout</strong></span>     ( <span class="methodparam">void</span>    )</div>    <p class="para rdfs-comment">    Returns the timeout in milliseconds to wait for I/O activity.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-gearmanclient.timeout-parameters">   <h3 class="title">参数</h3>   <span>此函数没有参数。</span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-gearmanclient.timeout-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    Timeout in milliseconds to wait for I/O activity.  A negative value means an infinite timeout.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 seealso" id="refsect1-gearmanclient.timeout-seealso">   <h3 class="title">参见</h3>   <span>    <ul class="simplelist">     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::setTimeout()} - Set socket I/O activity timeout</span></li>    </ul>   </span>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.gearmanclient.php">GearmanClient</a></div></div>
     * @return int Timeout in milliseconds to wait for I/O activity. A negative value means an*/
    public function timeout() {}

/**
*<div id="gearmanclient.settimeout" class="refentry">  <div class="refnamediv">   <h1 class="refname">GearmanClient::setTimeout</h1>   <p class="verinfo">(PECL gearman &gt;= 0.6.0)</p><p class="refpurpose"><span class="refname">GearmanClient::setTimeout</span> &mdash; <span class="dc-title">Set socket I/O activity timeout</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-gearmanclient.settimeout-description">   <h3 class="title">说明</h3>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">bool</span> <span class="methodname" style="color:#CC7832"><strong>GearmanClient::setTimeout</strong></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$timeout</span></span>    )</div>    <p class="para rdfs-comment">    Sets the timeout for socket I/O activity.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-gearmanclient.settimeout-parameters">   <h3 class="title">参数</h3>   <span>    <dl>            <dt> <span class="parameter" style="color:#2EACF9">timeout</span></dt>       <dd>        <p class="para">        An interval of time in milliseconds       </p>      </dd>          </dl>    </span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-gearmanclient.settimeout-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    Always returns <strong><span>TRUE</span></strong>.   </p>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.gearmanclient.php">GearmanClient</a></div></div>
     * @return bool Always returns true*/
    public function setTimeout($timeout) {}

/**
*<div id="gearmanclient.context" class="refentry">  <div class="refnamediv">   <h1 class="refname">GearmanClient::context</h1>   <p class="verinfo">(PECL gearman &gt;= 0.6.0)</p><p class="refpurpose"><span class="refname">GearmanClient::context</span> &mdash; <span class="dc-title">Get the application context</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-gearmanclient.context-description">   <h3 class="title">说明</h3>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">string</span> <span class="methodname" style="color:#CC7832"><strong>GearmanClient::context</strong></span>     ( <span class="methodparam">void</span>    )</div>    <p class="para rdfs-comment">    Get the application context previously set with <span class="methodname" style="color:#CC7832">{@link GearmanClient::setContext()}</span>.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-gearmanclient.context-parameters">   <h3 class="title">参数</h3>   <span>此函数没有参数。</span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-gearmanclient.context-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    The same context data structure set with <span class="methodname" style="color:#CC7832">{@link GearmanClient::setContext()}</span>   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 seealso" id="refsect1-gearmanclient.context-seealso">   <h3 class="title">参见</h3>   <span>    <ul class="simplelist">     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::setContext()} - Set application context</span></li>    </ul>   </span>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.gearmanclient.php">GearmanClient</a></div></div>
     * @return string The same context data structure set with GearmanClient::setContext*/
    public function context() {}

/**
*<div id="gearmanclient.setcontext" class="refentry">  <div class="refnamediv">   <h1 class="refname">GearmanClient::setContext</h1>   <p class="verinfo">(PECL gearman &gt;= 0.6.0)</p><p class="refpurpose"><span class="refname">GearmanClient::setContext</span> &mdash; <span class="dc-title">Set application context</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-gearmanclient.setcontext-description">   <h3 class="title">说明</h3>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">bool</span> <span class="methodname" style="color:#CC7832"><strong>GearmanClient::setContext</strong></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$context</span></span>    )</div>    <p class="para rdfs-comment">    Sets an arbitrary string to provide application context that can    later be retrieved by <span class="methodname" style="color:#CC7832">{@link GearmanClient::context()}</span>.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-gearmanclient.setcontext-parameters">   <h3 class="title">参数</h3>   <span>    <dl>            <dt> <span class="parameter" style="color:#2EACF9">context</span></dt>       <dd>        <p class="para">        Arbitrary context data       </p>      </dd>          </dl>    </span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-gearmanclient.setcontext-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    Always returns <strong><span>TRUE</span></strong>.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 seealso" id="refsect1-gearmanclient.setcontext-seealso">   <h3 class="title">参见</h3>   <span>    <ul class="simplelist">     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::context()} - Get the application context</span></li>    </ul>   </span>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.gearmanclient.php">GearmanClient</a></div></div>
     * @return bool Always returns true*/
    public function setContext($context) {}

/**
*<div id="gearmanclient.addserver" class="refentry">  <div class="refnamediv">   <h1 class="refname">GearmanClient::addServer</h1>   <p class="verinfo">(PECL gearman &gt;= 0.5.0)</p><p class="refpurpose"><span class="refname">GearmanClient::addServer</span> &mdash; <span class="dc-title">Add a job server to the client</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-gearmanclient.addserver-description">   <h3 class="title">说明</h3>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">bool</span> <span class="methodname" style="color:#CC7832"><strong>GearmanClient::addServer</strong></span>     ([ <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$host</span><span class="initializer"> = 127.0.0.1</span></span>    [, <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$port</span><span class="initializer"> = 4730</span></span>   ]] )</div>    <p class="para rdfs-comment">    Adds a job server to a list of servers that can be used to run a task.  No socket    I/O happens here; the server is simply added to the list.   </p>   </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-gearmanclient.addserver-parameters">   <h3 class="title">参数</h3>   <span>    <dl>            <dt> <span class="parameter" style="color:#2EACF9">host</span></dt>       <dd>        <p class="para">        任务服务器主机名。       </p>      </dd>                 <dt> <span class="parameter" style="color:#2EACF9">port</span></dt>       <dd>        <p class="para">        任务服务器端口号。       </p>      </dd>          </dl>    </span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-gearmanclient.addserver-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    成功时返回 <strong><span>TRUE</span></strong>， 或者在失败时返回 <strong><span>FALSE</span></strong>。   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 examples" id="refsect1-gearmanclient.addserver-examples">   <h3 class="title">范例</h3>   <span>    <div class="example" id="example-5336">     <p><strong>Example #1 Adding two job servers</strong></p>     <div class="example-contents"> <div class="phpcode" style="border-color:gray;background:#232525"><span><span style="color: #000000"> <span style="color: #9876AA">&lt;?php<br /><br /></span><span style="color: #FF8000">#&nbsp;Create&nbsp;our&nbsp;client&nbsp;object.<br /></span><span style="color: #9876AA">$gmclient</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #9876AA">GearmanClient</span><span style="color: #007700">();<br /><br /></span><span style="color: #FF8000">#&nbsp;Add&nbsp;two&nbsp;job&nbsp;servers,&nbsp;the&nbsp;first&nbsp;on&nbsp;the&nbsp;default&nbsp;4730&nbsp;port<br /></span><span style="color: #9876AA">$gmclient</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">addServer</span><span style="color: #007700">(</span><span style="color: #DD0000">"10.0.0.1"</span><span style="color: #007700">);&nbsp;<br /></span><span style="color: #9876AA">$gmclient</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">addServer</span><span style="color: #007700">(</span><span style="color: #DD0000">"10.0.0.2"</span><span style="color: #007700">,&nbsp;</span><span style="color: #9876AA">7003</span><span style="color: #007700">);<br /><br /></span><span style="color: #9876AA">?&gt;</span> </span> </span></div>     </div>     </div>   </span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 seealso" id="refsect1-gearmanclient.addserver-seealso">   <h3 class="title">参见</h3>   <span>    <ul class="simplelist">     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::addServers()} - Add a list of job servers to the client</span></li>    </ul>   </span>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.gearmanclient.php">GearmanClient</a></div></div>
     * @return bool*/
    public function addServer($host = '127.0.0.1', $port = 4730) {}

/**
*<div id="gearmanclient.addservers" class="refentry">  <div class="refnamediv">   <h1 class="refname">GearmanClient::addServers</h1>   <p class="verinfo">(PECL gearman &gt;= 0.5.0)</p><p class="refpurpose"><span class="refname">GearmanClient::addServers</span> &mdash; <span class="dc-title">Add a list of job servers to the client</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-gearmanclient.addservers-description">   <h3 class="title">说明</h3>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">bool</span> <span class="methodname" style="color:#CC7832"><strong>GearmanClient::addServers</strong></span>     ([ <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$servers</span><span class="initializer"> = 127.0.0.1:4730</span></span>   ] )</div>    <p class="para rdfs-comment">    Adds a list of job servers that can be used to run a task.  No socket I/O happens here;    the servers are simply added to the full list of servers.   </p>   </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-gearmanclient.addservers-parameters">   <h3 class="title">参数</h3>   <span>    <dl>            <dt> <span class="parameter" style="color:#2EACF9">servers</span></dt>       <dd>        <p class="para">        A comma-separated list of servers, each server specified in the format &#039;<em>host:port</em>&#039;.       </p>      </dd>          </dl>    </span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-gearmanclient.addservers-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    成功时返回 <strong><span>TRUE</span></strong>， 或者在失败时返回 <strong><span>FALSE</span></strong>。   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 examples" id="refsect1-gearmanclient.addservers-examples">   <h3 class="title">范例</h3>   <span>    <div class="example" id="example-5337">     <p><strong>Example #1 Add two job servers</strong></p>     <div class="example-contents"> <div class="phpcode" style="border-color:gray;background:#232525"><span><span style="color: #000000"> <span style="color: #9876AA">&lt;?php<br /><br /></span><span style="color: #FF8000">#&nbsp;Create&nbsp;our&nbsp;client&nbsp;object.<br /></span><span style="color: #9876AA">$gmclient</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #9876AA">GearmanClient</span><span style="color: #007700">();<br /><br /></span><span style="color: #FF8000">#&nbsp;Add&nbsp;multiple&nbsp;job&nbsp;servers,&nbsp;the&nbsp;first&nbsp;on&nbsp;the&nbsp;default&nbsp;4730&nbsp;port<br /></span><span style="color: #9876AA">$gmclient</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">addServers</span><span style="color: #007700">(</span><span style="color: #DD0000">"10.0.0.1,10.0.0.2:7003"</span><span style="color: #007700">);<br /><br /></span><span style="color: #9876AA">?&gt;</span> </span> </span></div>     </div>     </div>   </span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 seealso" id="refsect1-gearmanclient.addservers-seealso">   <h3 class="title">参见</h3>   <span>    <ul class="simplelist">     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::addServer()} - Add a job server to the client</span></li>    </ul>   </span>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.gearmanclient.php">GearmanClient</a></div></div>
     * @return bool*/
    public function addServers($servers = '127.0.0.1:4730') {}

    /**
       */
    public function wait() {}

/**
*<div id="gearmanclient.dohigh" class="refentry">  <div class="refnamediv">   <h1 class="refname">GearmanClient::doHigh</h1>   <p class="verinfo">(PECL gearman &gt;= 0.5.0)</p><p class="refpurpose"><span class="refname">GearmanClient::doHigh</span> &mdash; <span class="dc-title">Run a single high priority task</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-gearmanclient.dohigh-description">   <h3 class="title">说明</h3>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">string</span> <span class="methodname" style="color:#CC7832"><strong>GearmanClient::doHigh</strong></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$function_name</span></span>    , <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$workload</span></span>    [, <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$unique</span></span>   ] )</div>    <p class="para rdfs-comment">    Runs a single high priority task and returns a string representation of the result.  It is up to    the <a href="http://php.net/manual/zh/class.gearmanclient.php" class="classname">GearmanClient</a> and <a href="http://php.net/manual/zh/class.gearmanworker.php" class="classname">GearmanWorker</a> to    agree on the format of the result.  High priority tasks will get precedence over normal    and low priority tasks in the job queue.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-gearmanclient.dohigh-parameters">   <h3 class="title">参数</h3>   <span>    <dl>            <dt> <span class="parameter" style="color:#2EACF9">function_name</span></dt>       <dd>        <p class="para">        由程序自动执行的已注册函数。       </p>      </dd>                 <dt> <span class="parameter" style="color:#2EACF9">workload</span></dt>       <dd>        <p class="para">        被处理的序列化数据。       </p>      </dd>                 <dt> <span class="parameter" style="color:#2EACF9">unique</span></dt>       <dd>        <p class="para">        用于标识特定任务的唯一性 ID。       </p>      </dd>          </dl>    </span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-gearmanclient.dohigh-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    A string representing the results of running a task.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 seealso" id="refsect1-gearmanclient.dohigh-seealso">   <h3 class="title">参见</h3>   <span>    <ul class="simplelist">     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::doNormal()} - Run a single task and return a result</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::doLow()} - Run a single low priority task</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::doBackground()} - Run a task in the background</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::doHighBackground()} - Run a high priority task in the background</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::doLowBackground()} - Run a low priority task in the background</span></li>    </ul>   </span>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.gearmanclient.php">GearmanClient</a></div></div>
     * @return string A string representing the results of running a task*/
    public function doHigh($function_name, $workload, $unique = null) {}

/**
*<div id="gearmanclient.donormal" class="refentry">  <div class="refnamediv">   <h1 class="refname">GearmanClient::doNormal</h1>   <p class="verinfo">(No version information available, might only be in Git)</p><p class="refpurpose"><span class="refname">GearmanClient::doNormal</span> &mdash; <span class="dc-title">Run a single task and return a result</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-gearmanclient.donormal-description">   <h3 class="title">说明</h3>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">string</span> <span class="methodname" style="color:#CC7832"><strong>GearmanClient::doNormal</strong></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$function_name</span></span>    , <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$workload</span></span>    [, <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$unique</span></span>   ] )</div>    <p class="para rdfs-comment">    Runs a single task and returns a string representation of the result.  It is up to    the <a href="http://php.net/manual/zh/class.gearmanclient.php" class="classname">GearmanClient</a> and <a href="http://php.net/manual/zh/class.gearmanworker.php" class="classname">GearmanWorker</a> to    agree on the format of the result.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-gearmanclient.donormal-parameters">   <h3 class="title">参数</h3>   <span>    <dl>            <dt> <span class="parameter" style="color:#2EACF9">function_name</span></dt>       <dd>        <p class="para">        由程序自动执行的已注册函数。       </p>      </dd>                 <dt> <span class="parameter" style="color:#2EACF9">workload</span></dt>       <dd>        <p class="para">        被处理的序列化数据。       </p>      </dd>                 <dt> <span class="parameter" style="color:#2EACF9">unique</span></dt>       <dd>        <p class="para">        用于标识特定任务的唯一性 ID。       </p>      </dd>          </dl>    </span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-gearmanclient.donormal-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    A string representing the results of running a task.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 examples" id="refsect1-gearmanclient.donormal-examples">   <h3 class="title">范例</h3>   <span>    <div class="example" id="example-5347">     <p><strong>Example #1 Simple job submission with immediate return</strong></p>     <div class="example-contents"> <div class="phpcode" style="border-color:gray;background:#232525"><span><span style="color: #000000"> <span style="color: #9876AA">&lt;?php<br /><br />?&gt;</span> </span> </span></div>     </div>      <div class="example-contents"> <div class="phpcode" style="border-color:gray;background:#232525"><span><span style="color: #000000"> <span style="color: #9876AA">&lt;?php<br /><br /></span><span style="color: #FF8000">#&nbsp;Client&nbsp;code<br /><br /></span><span style="color: #007700">echo&nbsp;</span><span style="color: #DD0000">"Starting\n"</span><span style="color: #007700">;<br /><br /></span><span style="color: #FF8000">#&nbsp;Create&nbsp;our&nbsp;client&nbsp;object.<br /></span><span style="color: #9876AA">$gmclient</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #9876AA">GearmanClient</span><span style="color: #007700">();<br /><br /></span><span style="color: #FF8000">#&nbsp;Add&nbsp;default&nbsp;server&nbsp;(localhost).<br /></span><span style="color: #9876AA">$gmclient</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">addServer</span><span style="color: #007700">();<br /><br />echo&nbsp;</span><span style="color: #DD0000">"Sending&nbsp;job\n"</span><span style="color: #007700">;<br /><br /></span><span style="color: #9876AA">$result&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #9876AA">$gmclient</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">doNormal</span><span style="color: #007700">(</span><span style="color: #DD0000">"reverse"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"Hello!"</span><span style="color: #007700">);<br /><br />echo&nbsp;</span><span style="color: #DD0000">"Success:&nbsp;</span><span style="color: #9876AA">$result</span><span style="color: #DD0000">\n"</span><span style="color: #007700">;<br /><br /></span><span style="color: #9876AA">?&gt;</span> </span> </span></div>     </div>      <div class="example-contents"> <div class="phpcode" style="border-color:gray;background:#232525"><span><span style="color: #000000"> <span style="color: #9876AA">&lt;?php<br /><br /></span><span style="color: #007700">echo&nbsp;</span><span style="color: #DD0000">"Starting\n"</span><span style="color: #007700">;<br /><br /></span><span style="color: #FF8000">#&nbsp;Create&nbsp;our&nbsp;worker&nbsp;object.<br /></span><span style="color: #9876AA">$gmworker</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #9876AA">GearmanWorker</span><span style="color: #007700">();<br /><br /></span><span style="color: #FF8000">#&nbsp;Add&nbsp;default&nbsp;server&nbsp;(localhost).<br /></span><span style="color: #9876AA">$gmworker</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">addServer</span><span style="color: #007700">();<br /><br /></span><span style="color: #FF8000">#&nbsp;Register&nbsp;function&nbsp;"reverse"&nbsp;with&nbsp;the&nbsp;server.&nbsp;Change&nbsp;the&nbsp;worker&nbsp;function&nbsp;to<br />#&nbsp;"reverse_fn_fast"&nbsp;for&nbsp;a&nbsp;faster&nbsp;worker&nbsp;with&nbsp;no&nbsp;output.<br /></span><span style="color: #9876AA">$gmworker</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">addFunction</span><span style="color: #007700">(</span><span style="color: #DD0000">"reverse"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"reverse_fn"</span><span style="color: #007700">);<br /><br />print&nbsp;</span><span style="color: #DD0000">"Waiting&nbsp;for&nbsp;job...\n"</span><span style="color: #007700">;<br />while(</span><span style="color: #9876AA">$gmworker</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">work</span><span style="color: #007700">())<br />{<br />&nbsp;&nbsp;if&nbsp;(</span><span style="color: #9876AA">$gmworker</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">returnCode</span><span style="color: #007700">()&nbsp;!=&nbsp;</span><span style="color: #9876AA">GEARMAN_SUCCESS</span><span style="color: #007700">)<br />&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"return_code:&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #9876AA">$gmworker</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">returnCode</span><span style="color: #007700">()&nbsp;.&nbsp;</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;break;<br />&nbsp;&nbsp;}<br />}<br /><br />function&nbsp;</span><span style="color: #9876AA">reverse_fn</span><span style="color: #007700">(</span><span style="color: #9876AA">$job</span><span style="color: #007700">)<br />{<br />&nbsp;&nbsp;return&nbsp;</span><span style="color: #9876AA">strrev</span><span style="color: #007700">(</span><span style="color: #9876AA">$job</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">workload</span><span style="color: #007700">());<br />}<br /><br /></span><span style="color: #9876AA">?&gt;</span> </span> </span></div>     </div>      <div class="example-contents"><p>以上例程的输出类似于：</p></div>     <div class="example-contents screen" style="background:black;padding-left:5px;"> <div class="cdata"><span> Starting Sending job Success: !olleH </span></div>     </div>    </div>    <div class="example" id="example-5348">     <p><strong>Example #2 Submitting a job and retrieving incremental status</strong></p>     <div class="example-contents"><p>      A job is submitted and the script loops to retrieve status information.      The worker has an artificial delay which results in a long running job      and sends status and data as processing occurs.      Each subsequent call to <span class="methodname" style="color:#CC7832"><strong>GearmanClient::doNormal()</strong></span>      produces status information on the running job.     </p></div>     <div class="example-contents"> <div class="phpcode" style="border-color:gray;background:#232525"><span><span style="color: #000000"> <span style="color: #9876AA">&lt;?php<br /><br /></span><span style="color: #FF8000">#&nbsp;Client&nbsp;code<br /><br />#&nbsp;Create&nbsp;our&nbsp;client&nbsp;object.<br /></span><span style="color: #9876AA">$gmclient</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #9876AA">GearmanClient</span><span style="color: #007700">();<br /><br /></span><span style="color: #FF8000">#&nbsp;Add&nbsp;default&nbsp;server&nbsp;(localhost).<br /></span><span style="color: #9876AA">$gmclient</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">addServer</span><span style="color: #007700">();<br /><br />echo&nbsp;</span><span style="color: #DD0000">"Sending&nbsp;job\n"</span><span style="color: #007700">;<br /><br /></span><span style="color: #FF8000">#&nbsp;Send&nbsp;reverse&nbsp;job<br /></span><span style="color: #007700">do<br />{<br />&nbsp;&nbsp;</span><span style="color: #9876AA">$result&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #9876AA">$gmclient</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">doNormal</span><span style="color: #007700">(</span><span style="color: #DD0000">"reverse"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"Hello!"</span><span style="color: #007700">);<br />&nbsp;&nbsp;</span><span style="color: #FF8000">#&nbsp;Check&nbsp;for&nbsp;various&nbsp;return&nbsp;packets&nbsp;and&nbsp;errors.<br /><br />&nbsp;&nbsp;</span><span style="color: #007700">switch(</span><span style="color: #9876AA">$gmclient</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">returnCode</span><span style="color: #007700">())<br />&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;case&nbsp;</span><span style="color: #9876AA">GEARMAN_WORK_DATA</span><span style="color: #007700">:<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"Data:&nbsp;</span><span style="color: #9876AA">$result</span><span style="color: #DD0000">\n"</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;<br />&nbsp;&nbsp;&nbsp;&nbsp;case&nbsp;</span><span style="color: #9876AA">GEARMAN_WORK_STATUS</span><span style="color: #007700">:<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;list(</span><span style="color: #9876AA">$numerator</span><span style="color: #007700">,&nbsp;</span><span style="color: #9876AA">$denominator</span><span style="color: #007700">)=&nbsp;</span><span style="color: #9876AA">$gmclient</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">doStatus</span><span style="color: #007700">();<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"Status:&nbsp;</span><span style="color: #9876AA">$numerator</span><span style="color: #DD0000">/</span><span style="color: #9876AA">$denominator</span><span style="color: #DD0000">&nbsp;complete\n"</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;<br />&nbsp;&nbsp;&nbsp;&nbsp;case&nbsp;</span><span style="color: #9876AA">GEARMAN_WORK_FAIL</span><span style="color: #007700">:<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"Failed\n"</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;exit;<br />&nbsp;&nbsp;&nbsp;&nbsp;case&nbsp;</span><span style="color: #9876AA">GEARMAN_SUCCESS</span><span style="color: #007700">:<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;<br />&nbsp;&nbsp;&nbsp;&nbsp;default:<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"RET:&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #9876AA">$gmclient</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">returnCode</span><span style="color: #007700">()&nbsp;.&nbsp;</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"Error:&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #9876AA">$gmclient</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">error</span><span style="color: #007700">()&nbsp;.&nbsp;</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"Errno:&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #9876AA">$gmclient</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">getErrno</span><span style="color: #007700">()&nbsp;.&nbsp;</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;exit;<br />&nbsp;&nbsp;}<br />}<br />while(</span><span style="color: #9876AA">$gmclient</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">returnCode</span><span style="color: #007700">()&nbsp;!=&nbsp;</span><span style="color: #9876AA">GEARMAN_SUCCESS</span><span style="color: #007700">);<br /><br />echo&nbsp;</span><span style="color: #DD0000">"Success:&nbsp;</span><span style="color: #9876AA">$result</span><span style="color: #DD0000">\n"</span><span style="color: #007700">;<br /><br /></span><span style="color: #9876AA">?&gt;</span> </span> </span></div>     </div>      <div class="example-contents"> <div class="phpcode" style="border-color:gray;background:#232525"><span><span style="color: #000000"> <span style="color: #9876AA">&lt;?php<br /><br /></span><span style="color: #FF8000">#&nbsp;Worker&nbsp;code<br /><br /></span><span style="color: #007700">echo&nbsp;</span><span style="color: #DD0000">"Starting\n"</span><span style="color: #007700">;<br /><br /></span><span style="color: #FF8000">#&nbsp;Create&nbsp;our&nbsp;worker&nbsp;object.<br /></span><span style="color: #9876AA">$gmworker</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #9876AA">GearmanWorker</span><span style="color: #007700">();<br /><br /></span><span style="color: #FF8000">#&nbsp;Add&nbsp;default&nbsp;server&nbsp;(localhost).<br /></span><span style="color: #9876AA">$gmworker</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">addServer</span><span style="color: #007700">();<br /><br /></span><span style="color: #FF8000">#&nbsp;Register&nbsp;function&nbsp;"reverse"&nbsp;with&nbsp;the&nbsp;server.<br /></span><span style="color: #9876AA">$gmworker</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">addFunction</span><span style="color: #007700">(</span><span style="color: #DD0000">"reverse"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"reverse_fn"</span><span style="color: #007700">);<br /><br />print&nbsp;</span><span style="color: #DD0000">"Waiting&nbsp;for&nbsp;job...\n"</span><span style="color: #007700">;<br />while(</span><span style="color: #9876AA">$gmworker</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">work</span><span style="color: #007700">())<br />{<br />&nbsp;&nbsp;if&nbsp;(</span><span style="color: #9876AA">$gmworker</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">returnCode</span><span style="color: #007700">()&nbsp;!=&nbsp;</span><span style="color: #9876AA">GEARMAN_SUCCESS</span><span style="color: #007700">)<br />&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"return_code:&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #9876AA">$gmworker</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">returnCode</span><span style="color: #007700">()&nbsp;.&nbsp;</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;break;<br />&nbsp;&nbsp;}<br />}<br /><br />function&nbsp;</span><span style="color: #9876AA">reverse_fn</span><span style="color: #007700">(</span><span style="color: #9876AA">$job</span><span style="color: #007700">)<br />{<br />&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"Received&nbsp;job:&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #9876AA">$job</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">handle</span><span style="color: #007700">()&nbsp;.&nbsp;</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br /><br />&nbsp;&nbsp;</span><span style="color: #9876AA">$workload&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #9876AA">$job</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">workload</span><span style="color: #007700">();<br />&nbsp;&nbsp;</span><span style="color: #9876AA">$workload_size&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #9876AA">$job</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">workloadSize</span><span style="color: #007700">();<br /><br />&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"Workload:&nbsp;</span><span style="color: #9876AA">$workload</span><span style="color: #DD0000">&nbsp;(</span><span style="color: #9876AA">$workload_size</span><span style="color: #DD0000">)\n"</span><span style="color: #007700">;<br /><br />&nbsp;&nbsp;</span><span style="color: #FF8000">#&nbsp;This&nbsp;status&nbsp;loop&nbsp;is&nbsp;not&nbsp;needed,&nbsp;just&nbsp;showing&nbsp;how&nbsp;it&nbsp;works<br />&nbsp;&nbsp;</span><span style="color: #007700">for&nbsp;(</span><span style="color: #9876AA">$x</span><span style="color: #007700">=&nbsp;</span><span style="color: #9876AA">0</span><span style="color: #007700">;&nbsp;</span><span style="color: #9876AA">$x&nbsp;</span><span style="color: #007700">&lt;&nbsp;</span><span style="color: #9876AA">$workload_size</span><span style="color: #007700">;&nbsp;</span><span style="color: #9876AA">$x</span><span style="color: #007700">++)<br />&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"Sending&nbsp;status:&nbsp;"&nbsp;</span><span style="color: #007700">+&nbsp;</span><span style="color: #9876AA">$x&nbsp;</span><span style="color: #007700">+&nbsp;</span><span style="color: #9876AA">1&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">"/</span><span style="color: #9876AA">$workload_size</span><span style="color: #DD0000">&nbsp;complete\n"</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #9876AA">$job</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">sendStatus</span><span style="color: #007700">(</span><span style="color: #9876AA">$x</span><span style="color: #007700">+</span><span style="color: #9876AA">1</span><span style="color: #007700">,&nbsp;</span><span style="color: #9876AA">$workload_size</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #9876AA">$job</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">sendData</span><span style="color: #007700">(</span><span style="color: #9876AA">substr</span><span style="color: #007700">(</span><span style="color: #9876AA">$workload</span><span style="color: #007700">,&nbsp;</span><span style="color: #9876AA">$x</span><span style="color: #007700">,&nbsp;</span><span style="color: #9876AA">1</span><span style="color: #007700">));<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #9876AA">sleep</span><span style="color: #007700">(</span><span style="color: #9876AA">1</span><span style="color: #007700">);<br />&nbsp;&nbsp;}<br /><br />&nbsp;&nbsp;</span><span style="color: #9876AA">$result</span><span style="color: #007700">=&nbsp;</span><span style="color: #9876AA">strrev</span><span style="color: #007700">(</span><span style="color: #9876AA">$workload</span><span style="color: #007700">);<br />&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"Result:&nbsp;</span><span style="color: #9876AA">$result</span><span style="color: #DD0000">\n"</span><span style="color: #007700">;<br /><br />&nbsp;&nbsp;</span><span style="color: #FF8000">#&nbsp;Return&nbsp;what&nbsp;we&nbsp;want&nbsp;to&nbsp;send&nbsp;back&nbsp;to&nbsp;the&nbsp;client.<br />&nbsp;&nbsp;</span><span style="color: #007700">return&nbsp;</span><span style="color: #9876AA">$result</span><span style="color: #007700">;<br />}<br /><br /></span><span style="color: #9876AA">?&gt;</span> </span> </span></div>     </div>      <div class="example-contents"><p>以上例程的输出类似于：</p></div>     <div class="example-contents"><p>      Worker output:     </p></div>     <div class="example-contents screen" style="background:black;padding-left:5px;"> <div class="cdata"><span> Starting Waiting for job... Received job: H:foo.local:106 Workload: Hello! (6) 1/6 complete 2/6 complete 3/6 complete 4/6 complete 5/6 complete 6/6 complete Result: !olleH </span></div>     </div>     <div class="example-contents"><p>      Client output:     </p></div>     <div class="example-contents screen" style="background:black;padding-left:5px;"> <div class="cdata"><span> Starting Sending job Status: 1/6 complete Data: H Status: 2/6 complete Data: e Status: 3/6 complete Data: l Status: 4/6 complete Data: l Status: 5/6 complete Data: o Status: 6/6 complete Data: ! Success: !olleH </span></div>     </div>    </div>   </span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 seealso" id="refsect1-gearmanclient.donormal-seealso">   <h3 class="title">参见</h3>   <span>    <ul class="simplelist">     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::doHigh()} - Run a single high priority task</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::doLow()} - Run a single low priority task</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::doBackground()} - Run a task in the background</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::doHighBackground()} - Run a high priority task in the background</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::doLowBackground()} - Run a low priority task in the background</span></li>    </ul>   </span>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.gearmanclient.php">GearmanClient</a></div></div>
     * @return string A string representing the results of running a task*/
    public function doNormal($function_name, $workload, $unique = null) {}

/**
*<div id="gearmanclient.dolow" class="refentry">  <div class="refnamediv">   <h1 class="refname">GearmanClient::doLow</h1>   <p class="verinfo">(PECL gearman &gt;= 0.5.0)</p><p class="refpurpose"><span class="refname">GearmanClient::doLow</span> &mdash; <span class="dc-title">Run a single low priority task</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-gearmanclient.dolow-description">   <h3 class="title">说明</h3>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">string</span> <span class="methodname" style="color:#CC7832"><strong>GearmanClient::doLow</strong></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$function_name</span></span>    , <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$workload</span></span>    [, <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$unique</span></span>   ] )</div>    <p class="para rdfs-comment">    Runs a single low priority task and returns a string representation of the result.  It is up to    the <a href="http://php.net/manual/zh/class.gearmanclient.php" class="classname">GearmanClient</a> and <a href="http://php.net/manual/zh/class.gearmanworker.php" class="classname">GearmanWorker</a> to    agree on the format of the result.  Normal and high priority tasks will get precedence over    low priority tasks in the job queue.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-gearmanclient.dolow-parameters">   <h3 class="title">参数</h3>   <span>    <dl>            <dt> <span class="parameter" style="color:#2EACF9">function_name</span></dt>       <dd>        <p class="para">        由程序自动执行的已注册函数。       </p>      </dd>                 <dt> <span class="parameter" style="color:#2EACF9">workload</span></dt>       <dd>        <p class="para">        被处理的序列化数据。       </p>      </dd>                 <dt> <span class="parameter" style="color:#2EACF9">unique</span></dt>       <dd>        <p class="para">        用于标识特定任务的唯一性 ID。       </p>      </dd>          </dl>    </span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-gearmanclient.dolow-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    A string representing the results of running a task.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 seealso" id="refsect1-gearmanclient.dolow-seealso">   <h3 class="title">参见</h3>   <span>    <ul class="simplelist">     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::doNormal()} - Run a single task and return a result</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::doHigh()} - Run a single high priority task</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::doBackground()} - Run a task in the background</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::doHighBackground()} - Run a high priority task in the background</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::doLowBackground()} - Run a low priority task in the background</span></li>    </ul>   </span>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.gearmanclient.php">GearmanClient</a></div></div>
     * @return string A string representing the results of running a task*/
    public function doLow($function_name, $workload, $unique = null) {}

/**
*<div id="gearmanclient.dojobhandle" class="refentry">  <div class="refnamediv">   <h1 class="refname">GearmanClient::doJobHandle</h1>   <p class="verinfo">(PECL gearman &gt;= 0.5.0)</p><p class="refpurpose"><span class="refname">GearmanClient::doJobHandle</span> &mdash; <span class="dc-title">Get the job handle for the running task</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-gearmanclient.dojobhandle-description">   <h3 class="title">说明</h3>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">string</span> <span class="methodname" style="color:#CC7832"><strong>GearmanClient::doJobHandle</strong></span>     ( <span class="methodparam">void</span>    )</div>    <p class="para rdfs-comment">    Gets that job handle for a running task.  This should be used between repeated    <span class="methodname" style="color:#CC7832">{@link GearmanClient::doNormal()}</span> calls.  The job handle can then be used    to get information on the task.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-gearmanclient.dojobhandle-parameters">   <h3 class="title">参数</h3>   <span>此函数没有参数。</span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-gearmanclient.dojobhandle-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    The job handle for the running task.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 seealso" id="refsect1-gearmanclient.dojobhandle-seealso">   <h3 class="title">参见</h3>   <span>    <ul class="simplelist">     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::jobStatus()} - Get the status of a background job</span></li>    </ul>   </span>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.gearmanclient.php">GearmanClient</a></div></div>
     * @return string The job handle for the running task*/
    public function doJobHandle() {}

/**
*<div id="gearmanclient.dostatus" class="refentry">  <div class="refnamediv">   <h1 class="refname">GearmanClient::doStatus</h1>   <p class="verinfo">(PECL gearman &gt;= 0.5.0)</p><p class="refpurpose"><span class="refname">GearmanClient::doStatus</span> &mdash; <span class="dc-title">Get the status for the running task</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-gearmanclient.dostatus-description">   <h3 class="title">说明</h3>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">array</span> <span class="methodname" style="color:#CC7832"><strong>GearmanClient::doStatus</strong></span>     ( <span class="methodparam">void</span>    )</div>    <p class="para rdfs-comment">    Returns the status for the running task.  This should be used between repeated    <span class="methodname" style="color:#CC7832">{@link GearmanClient::doNormal()}</span> calls.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-gearmanclient.dostatus-parameters">   <h3 class="title">参数</h3>   <span>此函数没有参数。</span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-gearmanclient.dostatus-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    An array representing the percentage completion given as a fraction, with the    first element the numerator and the second element the denomintor.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 examples" id="refsect1-gearmanclient.dostatus-examples">   <h3 class="title">范例</h3>   <span>    <div class="example" id="example-5349">     <p><strong>Example #1 Get the status of a long running job</strong></p>     <div class="example-contents"><p>      The worker in this example has an artificial delay added during processing of the      string to be reversed.  After each delay it calls <span class="methodname" style="color:#CC7832">{@link GearmanJob::status()}</span>      which the client then picks up.     </p></div>     <div class="example-contents"> <div class="phpcode" style="border-color:gray;background:#232525"><span><span style="color: #000000"> <span style="color: #9876AA">&lt;?php<br /><br /></span><span style="color: #007700">echo&nbsp;</span><span style="color: #DD0000">"Starting\n"</span><span style="color: #007700">;<br /><br /></span><span style="color: #FF8000">#&nbsp;Create&nbsp;our&nbsp;client&nbsp;object.<br /></span><span style="color: #9876AA">$gmclient</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #9876AA">GearmanClient</span><span style="color: #007700">();<br /><br /></span><span style="color: #FF8000">#&nbsp;Add&nbsp;default&nbsp;server&nbsp;(localhost).<br /></span><span style="color: #9876AA">$gmclient</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">addServer</span><span style="color: #007700">();<br /><br />echo&nbsp;</span><span style="color: #DD0000">"Sending&nbsp;job\n"</span><span style="color: #007700">;<br /><br /></span><span style="color: #FF8000">#&nbsp;Send&nbsp;reverse&nbsp;job<br /></span><span style="color: #007700">do<br />{<br />&nbsp;&nbsp;</span><span style="color: #9876AA">$result&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #9876AA">$gmclient</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">doNormal</span><span style="color: #007700">(</span><span style="color: #DD0000">"reverse"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"Hello!"</span><span style="color: #007700">);<br /><br />&nbsp;&nbsp;</span><span style="color: #FF8000">#&nbsp;Check&nbsp;for&nbsp;various&nbsp;return&nbsp;packets&nbsp;and&nbsp;errors.<br />&nbsp;&nbsp;</span><span style="color: #007700">switch(</span><span style="color: #9876AA">$gmclient</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">returnCode</span><span style="color: #007700">())<br />&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;case&nbsp;</span><span style="color: #9876AA">GEARMAN_WORK_DATA</span><span style="color: #007700">:<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;<br />&nbsp;&nbsp;&nbsp;&nbsp;case&nbsp;</span><span style="color: #9876AA">GEARMAN_WORK_STATUS</span><span style="color: #007700">:<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">#&nbsp;get&nbsp;the&nbsp;current&nbsp;job&nbsp;status<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">list(</span><span style="color: #9876AA">$numerator</span><span style="color: #007700">,&nbsp;</span><span style="color: #9876AA">$denominator</span><span style="color: #007700">)=&nbsp;</span><span style="color: #9876AA">$gmclient</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">doStatus</span><span style="color: #007700">();<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"Status:&nbsp;</span><span style="color: #9876AA">$numerator</span><span style="color: #DD0000">/</span><span style="color: #9876AA">$denominator</span><span style="color: #DD0000">&nbsp;complete\n"</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;<br />&nbsp;&nbsp;&nbsp;&nbsp;case&nbsp;</span><span style="color: #9876AA">GEARMAN_WORK_FAIL</span><span style="color: #007700">:<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"Failed\n"</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;exit;<br />&nbsp;&nbsp;&nbsp;&nbsp;case&nbsp;</span><span style="color: #9876AA">GEARMAN_SUCCESS</span><span style="color: #007700">:<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;<br />&nbsp;&nbsp;&nbsp;&nbsp;default:<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"RET:&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #9876AA">$gmclient</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">returnCode</span><span style="color: #007700">()&nbsp;.&nbsp;</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;exit;<br />&nbsp;&nbsp;}<br />}<br />while(</span><span style="color: #9876AA">$gmclient</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">returnCode</span><span style="color: #007700">()&nbsp;!=&nbsp;</span><span style="color: #9876AA">GEARMAN_SUCCESS</span><span style="color: #007700">);<br /><br />echo&nbsp;</span><span style="color: #DD0000">"Success:&nbsp;</span><span style="color: #9876AA">$result</span><span style="color: #DD0000">\n"</span><span style="color: #007700">;<br /><br /></span><span style="color: #9876AA">?&gt;</span> </span> </span></div>     </div>      <div class="example-contents"><p>以上例程的输出类似于：</p></div>     <div class="example-contents screen" style="background:black;padding-left:5px;"> <div class="cdata"><span> Starting Sending job Status: 1/6 complete Status: 2/6 complete Status: 3/6 complete Status: 4/6 complete Status: 5/6 complete Status: 6/6 complete Success: !olleH </span></div>     </div>    </div>   </span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 seealso" id="refsect1-gearmanclient.dostatus-seealso">   <h3 class="title">参见</h3>   <span>    <ul class="simplelist">     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::doNormal()} - Run a single task and return a result</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanJob::status()} - Send status (deprecated)</span></li>    </ul>   </span>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.gearmanclient.php">GearmanClient</a></div></div>
     * @return array An array representing the percentage completion given as a fraction, with*/
    public function doStatus() {}

/**
*<div id="gearmanclient.dobackground" class="refentry">  <div class="refnamediv">   <h1 class="refname">GearmanClient::doBackground</h1>   <p class="verinfo">(PECL gearman &gt;= 0.5.0)</p><p class="refpurpose"><span class="refname">GearmanClient::doBackground</span> &mdash; <span class="dc-title">Run a task in the background</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-gearmanclient.dobackground-description">   <h3 class="title">说明</h3>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">string</span> <span class="methodname" style="color:#CC7832"><strong>GearmanClient::doBackground</strong></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$function_name</span></span>    , <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$workload</span></span>    [, <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$unique</span></span>   ] )</div>    <p class="para rdfs-comment">    Runs a task in the background, returning a job handle which can be used    to get the status of the running task.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-gearmanclient.dobackground-parameters">   <h3 class="title">参数</h3>   <span>    <dl>            <dt> <span class="parameter" style="color:#2EACF9">function_name</span></dt>       <dd>        <p class="para">        由程序自动执行的已注册函数。       </p>      </dd>                 <dt> <span class="parameter" style="color:#2EACF9">workload</span></dt>       <dd>        <p class="para">        被处理的序列化数据。       </p>      </dd>                 <dt> <span class="parameter" style="color:#2EACF9">unique</span></dt>       <dd>        <p class="para">        用于标识特定任务的唯一性 ID。       </p>      </dd>          </dl>    </span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-gearmanclient.dobackground-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    The job handle for the submitted task.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 examples" id="refsect1-gearmanclient.dobackground-examples">   <h3 class="title">范例</h3>   <span>    <div class="example" id="example-5346">     <p><strong>Example #1 Submit and monitor a background job</strong></p>     <div class="example-contents"><p>      The worker in this example has an artificial delay introduced to mimic      a long running job.  The client script periodically checks the status      of the running job.     </p></div>     <div class="example-contents"> <div class="phpcode" style="border-color:gray;background:#232525"><span><span style="color: #000000"> <span style="color: #9876AA">&lt;?php<br /><br /></span><span style="color: #FF8000">//&nbsp;create&nbsp;our&nbsp;object&nbsp;<br /></span><span style="color: #9876AA">$gmclient</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #9876AA">GearmanClient</span><span style="color: #007700">();<br /><br /></span><span style="color: #FF8000">//&nbsp;add&nbsp;the&nbsp;default&nbsp;server&nbsp;<br /></span><span style="color: #9876AA">$gmclient</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">addServer</span><span style="color: #007700">();<br /><br /></span><span style="color: #FF8000">//&nbsp;run&nbsp;reverse&nbsp;client&nbsp;<br /></span><span style="color: #9876AA">$job_handle&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #9876AA">$gmclient</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">doBackground</span><span style="color: #007700">(</span><span style="color: #DD0000">"reverse"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"this&nbsp;is&nbsp;a&nbsp;test"</span><span style="color: #007700">);<br /><br />if&nbsp;(</span><span style="color: #9876AA">$gmclient</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">returnCode</span><span style="color: #007700">()&nbsp;!=&nbsp;</span><span style="color: #9876AA">GEARMAN_SUCCESS</span><span style="color: #007700">)<br />{<br />&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"bad&nbsp;return&nbsp;code\n"</span><span style="color: #007700">;<br />&nbsp;&nbsp;exit;<br />}<br /><br /></span><span style="color: #9876AA">$done&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #9876AA">false</span><span style="color: #007700">;<br />do<br />{<br />&nbsp;&nbsp;&nbsp;</span><span style="color: #9876AA">sleep</span><span style="color: #007700">(</span><span style="color: #9876AA">3</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;</span><span style="color: #9876AA">$stat&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #9876AA">$gmclient</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">jobStatus</span><span style="color: #007700">(</span><span style="color: #9876AA">$job_handle</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;if&nbsp;(!</span><span style="color: #9876AA">$stat</span><span style="color: #007700">[</span><span style="color: #9876AA">0</span><span style="color: #007700">])&nbsp;</span><span style="color: #FF8000">//&nbsp;the&nbsp;job&nbsp;is&nbsp;known&nbsp;so&nbsp;it&nbsp;is&nbsp;not&nbsp;done<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #9876AA">$done&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #9876AA">true</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"Running:&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;(</span><span style="color: #9876AA">$stat</span><span style="color: #007700">[</span><span style="color: #9876AA">1</span><span style="color: #007700">]&nbsp;?&nbsp;</span><span style="color: #DD0000">"true"&nbsp;</span><span style="color: #007700">:&nbsp;</span><span style="color: #DD0000">"false"</span><span style="color: #007700">)&nbsp;.&nbsp;</span><span style="color: #DD0000">",&nbsp;numerator:&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #9876AA">$stat</span><span style="color: #007700">[</span><span style="color: #9876AA">2</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">",&nbsp;denomintor:&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #9876AA">$stat</span><span style="color: #007700">[</span><span style="color: #9876AA">3</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br />}<br />while(!</span><span style="color: #9876AA">$done</span><span style="color: #007700">);<br /><br />echo&nbsp;</span><span style="color: #DD0000">"done!\n"</span><span style="color: #007700">;<br /><br /></span><span style="color: #9876AA">?&gt;</span> </span> </span></div>     </div>      <div class="example-contents"><p>以上例程的输出类似于：</p></div>     <div class="example-contents screen" style="background:black;padding-left:5px;"> <div class="cdata"><span> Running: true, numerator: 3, denomintor: 14 Running: true, numerator: 6, denomintor: 14 Running: true, numerator: 9, denomintor: 14 Running: true, numerator: 12, denomintor: 14 Running: false, numerator: 0, denomintor: 0 done! </span></div>     </div>    </div>   </span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 seealso" id="refsect1-gearmanclient.dobackground-seealso">   <h3 class="title">参见</h3>   <span>    <ul class="simplelist">     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::doNormal()} - Run a single task and return a result</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::doHigh()} - Run a single high priority task</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::doLow()} - Run a single low priority task</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::doHighBackground()} - Run a high priority task in the background</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::doLowBackground()} - Run a low priority task in the background</span></li>    </ul>   </span>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.gearmanclient.php">GearmanClient</a></div></div>
     * @return string The job handle for the submitted task*/
    public function doBackground($function_name, $workload, $unique = null) {}

/**
*<div id="gearmanclient.dohighbackground" class="refentry">  <div class="refnamediv">   <h1 class="refname">GearmanClient::doHighBackground</h1>   <p class="verinfo">(PECL gearman &gt;= 0.5.0)</p><p class="refpurpose"><span class="refname">GearmanClient::doHighBackground</span> &mdash; <span class="dc-title">Run a high priority task in the background</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-gearmanclient.dohighbackground-description">   <h3 class="title">说明</h3>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">string</span> <span class="methodname" style="color:#CC7832"><strong>GearmanClient::doHighBackground</strong></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$function_name</span></span>    , <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$workload</span></span>    [, <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$unique</span></span>   ] )</div>    <p class="para rdfs-comment">    Runs a high priority task in the background, returning a job handle which can be used    to get the status of the running task.  High priority tasks take precedence over normal    and low priority tasks in the job queue.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-gearmanclient.dohighbackground-parameters">   <h3 class="title">参数</h3>   <span>    <dl>            <dt> <span class="parameter" style="color:#2EACF9">function_name</span></dt>       <dd>        <p class="para">        由程序自动执行的已注册函数。       </p>      </dd>                 <dt> <span class="parameter" style="color:#2EACF9">workload</span></dt>       <dd>        <p class="para">        被处理的序列化数据。       </p>      </dd>                 <dt> <span class="parameter" style="color:#2EACF9">unique</span></dt>       <dd>        <p class="para">        用于标识特定任务的唯一性 ID。       </p>      </dd>          </dl>    </span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-gearmanclient.dohighbackground-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    The job handle for the submitted task.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 seealso" id="refsect1-gearmanclient.dohighbackground-seealso">   <h3 class="title">参见</h3>   <span>    <ul class="simplelist">     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::doNormal()} - Run a single task and return a result</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::doHigh()} - Run a single high priority task</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::doLow()} - Run a single low priority task</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::doBackground()} - Run a task in the background</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::doLowBackground()} - Run a low priority task in the background</span></li>    </ul>   </span>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.gearmanclient.php">GearmanClient</a></div></div>
     * @return string The job handle for the submitted task*/
    public function doHighBackground($function_name, $workload, $unique = null) {}

/**
*<div id="gearmanclient.dolowbackground" class="refentry">  <div class="refnamediv">   <h1 class="refname">GearmanClient::doLowBackground</h1>   <p class="verinfo">(PECL gearman &gt;= 0.5.0)</p><p class="refpurpose"><span class="refname">GearmanClient::doLowBackground</span> &mdash; <span class="dc-title">Run a low priority task in the background</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-gearmanclient.dolowbackground-description">   <h3 class="title">说明</h3>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">string</span> <span class="methodname" style="color:#CC7832"><strong>GearmanClient::doLowBackground</strong></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$function_name</span></span>    , <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$workload</span></span>    [, <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$unique</span></span>   ] )</div>    <p class="para rdfs-comment">    Runs a low priority task in the background, returning a job handle which can be used    to get the status of the running task.  Normal and high priority tasks take precedence over    low priority tasks in the job queue.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-gearmanclient.dolowbackground-parameters">   <h3 class="title">参数</h3>   <span>    <dl>            <dt> <span class="parameter" style="color:#2EACF9">function_name</span></dt>       <dd>        <p class="para">        由程序自动执行的已注册函数。       </p>      </dd>                 <dt> <span class="parameter" style="color:#2EACF9">workload</span></dt>       <dd>        <p class="para">        被处理的序列化数据。       </p>      </dd>                 <dt> <span class="parameter" style="color:#2EACF9">unique</span></dt>       <dd>        <p class="para">        用于标识特定任务的唯一性 ID。       </p>      </dd>          </dl>    </span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-gearmanclient.dolowbackground-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    The job handle for the submitted task.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 seealso" id="refsect1-gearmanclient.dolowbackground-seealso">   <h3 class="title">参见</h3>   <span>    <ul class="simplelist">     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::doNormal()} - Run a single task and return a result</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::doHigh()} - Run a single high priority task</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::doLow()} - Run a single low priority task</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::doBackground()} - Run a task in the background</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::doHighBackground()} - Run a high priority task in the background</span></li>    </ul>   </span>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.gearmanclient.php">GearmanClient</a></div></div>
     * @return string The job handle for the submitted task*/
    public function doLowBackground($function_name, $workload, $unique = null) {}

/**
*<div id="gearmanclient.jobstatus" class="refentry">  <div class="refnamediv">   <h1 class="refname">GearmanClient::jobStatus</h1>   <h1 class="refname">gearman_job_status</h1>   <p class="verinfo">(PECL gearman &gt;= 0.5.0)</p><p class="refpurpose"><span class="refname">GearmanClient::jobStatus</span> -- <span class="refname">gearman_job_status</span> &mdash; <span class="dc-title">Get the status of a background job</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-gearmanclient.jobstatus-description">   <h3 class="title">说明</h3>   <p class="para">面向对象风格 (method):</p>    <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">array</span> <span class="methodname" style="color:#CC7832"><strong>GearmanClient::jobStatus</strong></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$job_handle</span></span>     )</div>     <p class="para rdfs-comment">     Gets the status for a background job given a job handle.  The status information will     specify whether the job is known, whether the job is currently running, and     the percentage completion.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-gearmanclient.jobstatus-parameters">   <h3 class="title">参数</h3>   <span>    <dl>            <dt> <span class="parameter" style="color:#2EACF9">job_handle</span></dt>       <dd>        <p class="para">        由 Gearman 服务器指派的工作句柄。       </p>      </dd>          </dl>    </span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-gearmanclient.jobstatus-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    An array containing status information for the job corresponding to the supplied    job handle.  The first array element is a boolean indicating whether the job is    even known, the second is a boolean indicating whether the job is still running,    and the third and fourth elements correspond to the numerator and denominator    of the fractional completion percentage, respectively.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 examples" id="refsect1-gearmanclient.jobstatus-examples">   <h3 class="title">范例</h3>   <span>    <div class="example" id="example-5350">     <p><strong>Example #1 Monitor the status of a long running background job</strong></p>     <div class="example-contents"> <div class="phpcode" style="border-color:gray;background:#232525"><span><span style="color: #000000"> <span style="color: #9876AA">&lt;?php<br /><br /></span><span style="color: #FF8000">//&nbsp;create&nbsp;our&nbsp;object&nbsp;<br /></span><span style="color: #9876AA">$gmclient</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #9876AA">GearmanClient</span><span style="color: #007700">();<br /><br /></span><span style="color: #FF8000">//&nbsp;add&nbsp;the&nbsp;default&nbsp;server&nbsp;<br /></span><span style="color: #9876AA">$gmclient</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">addServer</span><span style="color: #007700">();<br /><br /></span><span style="color: #FF8000">//&nbsp;run&nbsp;reverse&nbsp;client&nbsp;<br /></span><span style="color: #9876AA">$job_handle&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #9876AA">$gmclient</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">doBackground</span><span style="color: #007700">(</span><span style="color: #DD0000">"reverse"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"this&nbsp;is&nbsp;a&nbsp;test"</span><span style="color: #007700">);<br /><br />if&nbsp;(</span><span style="color: #9876AA">$gmclient</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">returnCode</span><span style="color: #007700">()&nbsp;!=&nbsp;</span><span style="color: #9876AA">GEARMAN_SUCCESS</span><span style="color: #007700">)<br />{<br />&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"bad&nbsp;return&nbsp;code\n"</span><span style="color: #007700">;<br />&nbsp;&nbsp;exit;<br />}<br /><br /></span><span style="color: #9876AA">$done&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #9876AA">false</span><span style="color: #007700">;<br />do<br />{<br />&nbsp;&nbsp;&nbsp;</span><span style="color: #9876AA">sleep</span><span style="color: #007700">(</span><span style="color: #9876AA">3</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;</span><span style="color: #9876AA">$stat&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #9876AA">$gmclient</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">jobStatus</span><span style="color: #007700">(</span><span style="color: #9876AA">$job_handle</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;if&nbsp;(!</span><span style="color: #9876AA">$stat</span><span style="color: #007700">[</span><span style="color: #9876AA">0</span><span style="color: #007700">])&nbsp;</span><span style="color: #FF8000">//&nbsp;the&nbsp;job&nbsp;is&nbsp;known&nbsp;so&nbsp;it&nbsp;is&nbsp;not&nbsp;done<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #9876AA">$done&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #9876AA">true</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"Running:&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;(</span><span style="color: #9876AA">$stat</span><span style="color: #007700">[</span><span style="color: #9876AA">1</span><span style="color: #007700">]&nbsp;?&nbsp;</span><span style="color: #DD0000">"true"&nbsp;</span><span style="color: #007700">:&nbsp;</span><span style="color: #DD0000">"false"</span><span style="color: #007700">)&nbsp;.&nbsp;</span><span style="color: #DD0000">",&nbsp;numerator:&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #9876AA">$stat</span><span style="color: #007700">[</span><span style="color: #9876AA">2</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">",&nbsp;denomintor:&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #9876AA">$stat</span><span style="color: #007700">[</span><span style="color: #9876AA">3</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br />}<br />while(!</span><span style="color: #9876AA">$done</span><span style="color: #007700">);<br /><br />echo&nbsp;</span><span style="color: #DD0000">"done!\n"</span><span style="color: #007700">;<br /><br /></span><span style="color: #9876AA">?&gt;</span> </span> </span></div>      </div>       <div class="example-contents"><p>以上例程的输出类似于：</p></div>      <div class="example-contents screen" style="background:black;padding-left:5px;"> <div class="cdata"><span> Running: true, numerator: 3, denomintor: 14 Running: true, numerator: 6, denomintor: 14 Running: true, numerator: 9, denomintor: 14 Running: true, numerator: 12, denomintor: 14 Running: false, numerator: 0, denomintor: 0 done! </span></div>     </div>    </div>   </span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 seealso" id="refsect1-gearmanclient.jobstatus-seealso">   <h3 class="title">参见</h3>   <span>    <ul class="simplelist">     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::doStatus()} - Get the status for the running task</span></li>    </ul>   </span>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.gearmanclient.php">GearmanClient</a></div></div>
     * @return array An array containing status information for the job corresponding to the*/
    public function jobStatus($job_handle) {}

/**
*<div id="gearmanclient.addtask" class="refentry">  <div class="refnamediv">   <h1 class="refname">GearmanClient::addTask</h1>   <p class="verinfo">(PECL gearman &gt;= 0.5.0)</p><p class="refpurpose"><span class="refname">GearmanClient::addTask</span> &mdash; <span class="dc-title">Add a task to be run in parallel</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-gearmanclient.addtask-description">   <h3 class="title">说明</h3>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.gearmantask.php" class="type GearmanTask" style="color:#EAB766">GearmanTask</a></span> <span class="methodname" style="color:#CC7832"><strong>GearmanClient::addTask</strong></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$function_name</span></span>    , <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$workload</span></span>    [, <span class="methodparam"><span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/language.pseudo-types.php#language.types.mixed" class="type mixed" style="color:#EAB766">mixed</a></span> <span class="parameter" style="color:#2EACF9">&$context</span></span>    [, <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$unique</span></span>   ]] )</div>    <p class="para rdfs-comment">    Adds a task to be run in parallel with other tasks.  Call this method for all the tasks    to be run in parallel, then call <span class="methodname" style="color:#CC7832">{@link GearmanClient::runTasks()}</span> to     perform the work.  Note that enough workers need to be available for the tasks to all    run in parallel.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-gearmanclient.addtask-parameters">   <h3 class="title">参数</h3>   <span>    <dl>            <dt> <span class="parameter" style="color:#2EACF9">function_name</span></dt>       <dd>        <p class="para">        由程序自动执行的已注册函数。       </p>      </dd>                 <dt> <span class="parameter" style="color:#2EACF9">workload</span></dt>       <dd>        <p class="para">        被处理的序列化数据。       </p>      </dd>                 <dt> <span class="parameter" style="color:#2EACF9">context</span></dt>       <dd>        <p class="para">        与任务关联的应用程序上下文。       </p>      </dd>                 <dt> <span class="parameter" style="color:#2EACF9">unique</span></dt>       <dd>        <p class="para">        用于标识特定任务的唯一性 ID。       </p>      </dd>          </dl>    </span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-gearmanclient.addtask-returnvalues">   <h3 class="title">返回值</h3>  <p class="para">    A <a href="http://php.net/manual/zh/class.gearmantask.php" class="classname">GearmanTask</a> object or <strong><span>FALSE</span></strong> if the task could not be added.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 examples" id="refsect1-gearmanclient.addtask-examples">   <h3 class="title">范例</h3>   <span>    <div class="example" id="example-5338">     <p><strong>Example #1 Basic submission of two tasks</strong></p>     <div class="example-contents"> <div class="phpcode" style="border-color:gray;background:#232525"><span><span style="color: #000000"> <span style="color: #9876AA">&lt;?php<br /><br /></span><span style="color: #FF8000">#&nbsp;Create&nbsp;our&nbsp;gearman&nbsp;client<br /></span><span style="color: #9876AA">$gmclient</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #9876AA">GearmanClient</span><span style="color: #007700">();&nbsp;<br /><br /></span><span style="color: #FF8000">#&nbsp;add&nbsp;the&nbsp;default&nbsp;job&nbsp;server<br /></span><span style="color: #9876AA">$gmclient</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">addServer</span><span style="color: #007700">();&nbsp;<br /><br /></span><span style="color: #FF8000">#&nbsp;set&nbsp;a&nbsp;function&nbsp;to&nbsp;be&nbsp;called&nbsp;when&nbsp;the&nbsp;work&nbsp;is&nbsp;complete<br /></span><span style="color: #9876AA">$gmclient</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">setCompleteCallback</span><span style="color: #007700">(</span><span style="color: #DD0000">"complete"</span><span style="color: #007700">);&nbsp;<br /><br /></span><span style="color: #FF8000">#&nbsp;add&nbsp;a&nbsp;task&nbsp;to&nbsp;perform&nbsp;the&nbsp;"reverse"&nbsp;function&nbsp;on&nbsp;the&nbsp;string&nbsp;"Hello&nbsp;World!"<br /></span><span style="color: #9876AA">$gmclient</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">addTask</span><span style="color: #007700">(</span><span style="color: #DD0000">"reverse"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"Hello&nbsp;World!"</span><span style="color: #007700">,&nbsp;</span><span style="color: #9876AA">null</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"1"</span><span style="color: #007700">);&nbsp;<br /><br /></span><span style="color: #FF8000">#&nbsp;add&nbsp;another&nbsp;task&nbsp;to&nbsp;perform&nbsp;the&nbsp;"reverse"&nbsp;function&nbsp;on&nbsp;the&nbsp;string&nbsp;"!dlroW&nbsp;olleH"<br /></span><span style="color: #9876AA">$gmclient</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">addTask</span><span style="color: #007700">(</span><span style="color: #DD0000">"reverse"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"!dlroW&nbsp;olleH"</span><span style="color: #007700">,&nbsp;</span><span style="color: #9876AA">null</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"2"</span><span style="color: #007700">);&nbsp;<br /><br /></span><span style="color: #FF8000">#&nbsp;run&nbsp;the&nbsp;tasks<br /></span><span style="color: #9876AA">$gmclient</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">runTasks</span><span style="color: #007700">();&nbsp;<br /><br />function&nbsp;</span><span style="color: #9876AA">complete</span><span style="color: #007700">(</span><span style="color: #9876AA">$task</span><span style="color: #007700">)&nbsp;<br />{&nbsp;<br />&nbsp;&nbsp;print&nbsp;</span><span style="color: #DD0000">"COMPLETE:&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #9876AA">$task</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">unique</span><span style="color: #007700">()&nbsp;.&nbsp;</span><span style="color: #DD0000">",&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #9876AA">$task</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">data</span><span style="color: #007700">()&nbsp;.&nbsp;</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;&nbsp;<br />}<br /><br /></span><span style="color: #9876AA">?&gt;</span> </span> </span></div>     </div>      <div class="example-contents"><p>以上例程的输出类似于：</p></div>     <div class="example-contents screen" style="background:black;padding-left:5px;"> <div class="cdata"><span> COMPLETE: 2, Hello World! COMPLETE: 1, !dlroW olleH </span></div>     </div>    </div>    <div class="example" id="example-5339">     <p><strong>Example #2 Basic submission of two tasks with passing application context</strong></p>     <div class="example-contents"> <div class="phpcode" style="border-color:gray;background:#232525"><span><span style="color: #000000"> <span style="color: #9876AA">&lt;?php<br /><br />$client&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #9876AA">GearmanClient</span><span style="color: #007700">();<br /></span><span style="color: #9876AA">$client</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">addServer</span><span style="color: #007700">();<br /><br /></span><span style="color: #FF8000">#&nbsp;set&nbsp;a&nbsp;function&nbsp;to&nbsp;be&nbsp;called&nbsp;when&nbsp;the&nbsp;work&nbsp;is&nbsp;complete<br /></span><span style="color: #9876AA">$client</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">setCompleteCallback</span><span style="color: #007700">(</span><span style="color: #DD0000">"reverse_complete"</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">#&nbsp;Add&nbsp;some&nbsp;tasks&nbsp;for&nbsp;a&nbsp;placeholder&nbsp;of&nbsp;where&nbsp;to&nbsp;put&nbsp;the&nbsp;results<br /></span><span style="color: #9876AA">$results&nbsp;</span><span style="color: #007700">=&nbsp;array();<br /></span><span style="color: #9876AA">$client</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">addTask</span><span style="color: #007700">(</span><span style="color: #DD0000">"reverse"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"Hello&nbsp;World!"</span><span style="color: #007700">,&nbsp;&amp;</span><span style="color: #9876AA">$results</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"t1"</span><span style="color: #007700">);<br /></span><span style="color: #9876AA">$client</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">addTask</span><span style="color: #007700">(</span><span style="color: #DD0000">"reverse"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"!dlroW&nbsp;olleH"</span><span style="color: #007700">,&nbsp;&amp;</span><span style="color: #9876AA">$results</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"t2"</span><span style="color: #007700">);<br /><br /></span><span style="color: #9876AA">$client</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">runTasks</span><span style="color: #007700">();<br /><br /></span><span style="color: #FF8000">#&nbsp;The&nbsp;results&nbsp;should&nbsp;now&nbsp;be&nbsp;filled&nbsp;in&nbsp;from&nbsp;the&nbsp;callbacks<br /></span><span style="color: #007700">foreach&nbsp;(</span><span style="color: #9876AA">$results&nbsp;</span><span style="color: #007700">as&nbsp;</span><span style="color: #9876AA">$id&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #9876AA">$result</span><span style="color: #007700">)<br />&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #9876AA">$id&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">":&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #9876AA">$result</span><span style="color: #007700">[</span><span style="color: #DD0000">'handle'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">",&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #9876AA">$result</span><span style="color: #007700">[</span><span style="color: #DD0000">'data'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br /><br /><br />function&nbsp;</span><span style="color: #9876AA">reverse_complete</span><span style="color: #007700">(</span><span style="color: #9876AA">$task</span><span style="color: #007700">,&nbsp;</span><span style="color: #9876AA">$results</span><span style="color: #007700">)<br />{<br />&nbsp;&nbsp;&nbsp;</span><span style="color: #9876AA">$results</span><span style="color: #007700">[</span><span style="color: #9876AA">$task</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">unique</span><span style="color: #007700">()]&nbsp;=&nbsp;array(</span><span style="color: #DD0000">"handle"</span><span style="color: #007700">=&gt;</span><span style="color: #9876AA">$task</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">jobHandle</span><span style="color: #007700">(),&nbsp;</span><span style="color: #DD0000">"data"</span><span style="color: #007700">=&gt;</span><span style="color: #9876AA">$task</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">data</span><span style="color: #007700">());<br />}<br /><br /></span><span style="color: #9876AA">?&gt;</span> </span> </span></div>     </div>      <div class="example-contents"><p>以上例程的输出类似于：</p></div>     <div class="example-contents screen" style="background:black;padding-left:5px;"> <div class="cdata"><span> t2: H.foo:21, Hello World! t1: H:foo:22, !dlroW olleH </span></div>     </div>    </div>   </span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 seealso" id="refsect1-gearmanclient.addtask-seealso">   <h3 class="title">参见</h3>   <span>    <ul class="simplelist">     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::addTaskHigh()} - Add a high priority task to run in parallel</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::addTaskLow()} - Add a low priority task to run in parallel</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::addTaskBackground()} - Add a background task to be run in parallel</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::addTaskHighBackground()} - Add a high priority background task to be run in parallel</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::addTaskLowBackground()} - Add a low priority background task to be run in parallel</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::runTasks()} - Run a list of tasks in parallel</span></li>    </ul>   </span>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.gearmanclient.php">GearmanClient</a></div></div>
     * @return GearmanTask A GearmanTask object or false if the task could not be added*/
    public function addTask($function_name, $workload, $context = null, $unique = null) {}

/**
*<div id="gearmanclient.addtaskhigh" class="refentry">  <div class="refnamediv">   <h1 class="refname">GearmanClient::addTaskHigh</h1>   <p class="verinfo">(PECL gearman &gt;= 0.5.0)</p><p class="refpurpose"><span class="refname">GearmanClient::addTaskHigh</span> &mdash; <span class="dc-title">Add a high priority task to run in parallel</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-gearmanclient.addtaskhigh-description">   <h3 class="title">说明</h3>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.gearmantask.php" class="type GearmanTask" style="color:#EAB766">GearmanTask</a></span> <span class="methodname" style="color:#CC7832"><strong>GearmanClient::addTaskHigh</strong></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$function_name</span></span>    , <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$workload</span></span>    [, <span class="methodparam"><span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/language.pseudo-types.php#language.types.mixed" class="type mixed" style="color:#EAB766">mixed</a></span> <span class="parameter" style="color:#2EACF9">&$context</span></span>    [, <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$unique</span></span>   ]] )</div>    <p class="para rdfs-comment">    Adds a high priority task to be run in parallel with other tasks.  Call this method for all    the high priority tasks to be run in parallel, then call    <span class="methodname" style="color:#CC7832">{@link GearmanClient::runTasks()}</span> to perform the work.  Tasks with a high    priority will be selected from the queue before those of normal or low priority.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-gearmanclient.addtaskhigh-parameters">   <h3 class="title">参数</h3>   <span>    <dl>            <dt> <span class="parameter" style="color:#2EACF9">function_name</span></dt>       <dd>        <p class="para">        由程序自动执行的已注册函数。       </p>      </dd>                 <dt> <span class="parameter" style="color:#2EACF9">workload</span></dt>       <dd>        <p class="para">        被处理的序列化数据。       </p>      </dd>                 <dt> <span class="parameter" style="color:#2EACF9">context</span></dt>       <dd>        <p class="para">        与任务关联的应用程序上下文。       </p>      </dd>                 <dt> <span class="parameter" style="color:#2EACF9">unique</span></dt>       <dd>        <p class="para">        用于标识特定任务的唯一性 ID。       </p>      </dd>          </dl>    </span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-gearmanclient.addtaskhigh-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    A <a href="http://php.net/manual/zh/class.gearmantask.php" class="classname">GearmanTask</a> object or <strong><span>FALSE</span></strong> if the task could not be added.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 examples" id="refsect1-gearmanclient.addtaskhigh-examples">   <h3 class="title">范例</h3>   <span>    <div class="example" id="example-5341">     <p><strong>Example #1 A high priority task along with two normal tasks</strong></p>     <div class="example-contents"><p>      A high priority task is included among two other tasks.  A single worker      is available, so that tasks are run one at a time, with the high priority      task run first.     </p></div>     <div class="example-contents"> <div class="phpcode" style="border-color:gray;background:#232525"><span><span style="color: #000000"> <span style="color: #9876AA">&lt;?php<br /><br /></span><span style="color: #FF8000">#&nbsp;create&nbsp;the&nbsp;gearman&nbsp;client<br /></span><span style="color: #9876AA">$gmc</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #9876AA">GearmanClient</span><span style="color: #007700">();<br /><br /></span><span style="color: #FF8000">#&nbsp;add&nbsp;the&nbsp;default&nbsp;job&nbsp;server<br /></span><span style="color: #9876AA">$gmc</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">addServer</span><span style="color: #007700">();<br /><br /></span><span style="color: #FF8000">#&nbsp;set&nbsp;the&nbsp;callback&nbsp;for&nbsp;when&nbsp;the&nbsp;job&nbsp;is&nbsp;complete<br /></span><span style="color: #9876AA">$gmc</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">setCompleteCallback</span><span style="color: #007700">(</span><span style="color: #DD0000">"reverse_complete"</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">#&nbsp;add&nbsp;tasks,&nbsp;one&nbsp;of&nbsp;which&nbsp;is&nbsp;high&nbsp;priority<br /></span><span style="color: #9876AA">$task</span><span style="color: #007700">=&nbsp;</span><span style="color: #9876AA">$gmc</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">addTask</span><span style="color: #007700">(</span><span style="color: #DD0000">"reverse"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"Hello&nbsp;World!"</span><span style="color: #007700">,&nbsp;</span><span style="color: #9876AA">null</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"1"</span><span style="color: #007700">);<br /></span><span style="color: #9876AA">$task</span><span style="color: #007700">=&nbsp;</span><span style="color: #9876AA">$gmc</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">addTaskHigh</span><span style="color: #007700">(</span><span style="color: #DD0000">"reverse"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"!dlroW&nbsp;olleH"</span><span style="color: #007700">,&nbsp;</span><span style="color: #9876AA">null</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"2"</span><span style="color: #007700">);<br /></span><span style="color: #9876AA">$task</span><span style="color: #007700">=&nbsp;</span><span style="color: #9876AA">$gmc</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">addTask</span><span style="color: #007700">(</span><span style="color: #DD0000">"reverse"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"Hello&nbsp;World!"</span><span style="color: #007700">,&nbsp;</span><span style="color: #9876AA">null</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"3"</span><span style="color: #007700">);<br /><br />if&nbsp;(!&nbsp;</span><span style="color: #9876AA">$gmc</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">runTasks</span><span style="color: #007700">())<br />{<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"ERROR&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #9876AA">$gmc</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">error</span><span style="color: #007700">()&nbsp;.&nbsp;</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;exit;<br />}<br />echo&nbsp;</span><span style="color: #DD0000">"DONE\n"</span><span style="color: #007700">;<br /><br />function&nbsp;</span><span style="color: #9876AA">reverse_complete</span><span style="color: #007700">(</span><span style="color: #9876AA">$task</span><span style="color: #007700">)<br />{<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"COMPLETE:&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #9876AA">$task</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">unique</span><span style="color: #007700">()&nbsp;.&nbsp;</span><span style="color: #DD0000">",&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #9876AA">$task</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">data</span><span style="color: #007700">()&nbsp;.&nbsp;</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br />}<br /><br /></span><span style="color: #9876AA">?&gt;</span> </span> </span></div>     </div>      <div class="example-contents"><p>以上例程的输出类似于：</p></div>     <div class="example-contents screen" style="background:black;padding-left:5px;"> <div class="cdata"><span> COMPLETE: 2, Hello World! COMPLETE: 3, !dlroW olleH COMPLETE: 1, !dlroW olleH DONE </span></div>     </div>    </div>   </span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 seealso" id="refsect1-gearmanclient.addtaskhigh-seealso">   <h3 class="title">参见</h3>   <span>    <ul class="simplelist">     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::addTask()} - Add a task to be run in parallel</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::addTaskLow()} - Add a low priority task to run in parallel</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::addTaskBackground()} - Add a background task to be run in parallel</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::addTaskHighBackground()} - Add a high priority background task to be run in parallel</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::addTaskLowBackground()} - Add a low priority background task to be run in parallel</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::runTasks()} - Run a list of tasks in parallel</span></li>    </ul>   </span>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.gearmanclient.php">GearmanClient</a></div></div>
     * @return GearmanTask A GearmanTask object or false if the task could not be added*/
    public function addTaskHigh($function_name, $workload, $context = null, $unique = null) {}

/**
*<div id="gearmanclient.addtasklow" class="refentry">  <div class="refnamediv">   <h1 class="refname">GearmanClient::addTaskLow</h1>   <p class="verinfo">(PECL gearman &gt;= 0.5.0)</p><p class="refpurpose"><span class="refname">GearmanClient::addTaskLow</span> &mdash; <span class="dc-title">Add a low priority task to run in parallel</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-gearmanclient.addtasklow-description">   <h3 class="title">说明</h3>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.gearmantask.php" class="type GearmanTask" style="color:#EAB766">GearmanTask</a></span> <span class="methodname" style="color:#CC7832"><strong>GearmanClient::addTaskLow</strong></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$function_name</span></span>    , <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$workload</span></span>    [, <span class="methodparam"><span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/language.pseudo-types.php#language.types.mixed" class="type mixed" style="color:#EAB766">mixed</a></span> <span class="parameter" style="color:#2EACF9">&$context</span></span>    [, <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$unique</span></span>   ]] )</div>    <p class="para rdfs-comment">    Adds a low priority background task to be run in parallel with other tasks.    Call this method for all the tasks to be run in parallel, then call    <span class="methodname" style="color:#CC7832">{@link GearmanClient::runTasks()}</span> to perform the work. Tasks with a low    priority will be selected from the queue after those of normal or low priority.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-gearmanclient.addtasklow-parameters">   <h3 class="title">参数</h3>   <span>    <dl>            <dt> <span class="parameter" style="color:#2EACF9">function_name</span></dt>       <dd>        <p class="para">        由程序自动执行的已注册函数。       </p>      </dd>                 <dt> <span class="parameter" style="color:#2EACF9">workload</span></dt>       <dd>        <p class="para">        被处理的序列化数据。       </p>      </dd>                 <dt> <span class="parameter" style="color:#2EACF9">context</span></dt>       <dd>        <p class="para">        与任务关联的应用程序上下文。       </p>      </dd>                 <dt> <span class="parameter" style="color:#2EACF9">unique</span></dt>       <dd>        <p class="para">        用于标识特定任务的唯一性 ID。       </p>      </dd>          </dl>    </span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-gearmanclient.addtasklow-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    A <a href="http://php.net/manual/zh/class.gearmantask.php" class="classname">GearmanTask</a> object or <strong><span>FALSE</span></strong> if the task could not be added.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 examples" id="refsect1-gearmanclient.addtasklow-examples">   <h3 class="title">范例</h3>   <span>    <div class="example" id="example-5342">     <p><strong>Example #1 A low priority task along with two normal tasks</strong></p>     <div class="example-contents"><p>      A low priority task is included among two other tasks.  A single worker      is available, so that tasks are run one at a time, with the low priority      task run last.     </p></div>     <div class="example-contents"> <div class="phpcode" style="border-color:gray;background:#232525"><span><span style="color: #000000"> <span style="color: #9876AA">&lt;?php<br /><br /></span><span style="color: #FF8000">#&nbsp;create&nbsp;the&nbsp;gearman&nbsp;client<br /></span><span style="color: #9876AA">$gmc</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #9876AA">GearmanClient</span><span style="color: #007700">();<br /><br /></span><span style="color: #FF8000">#&nbsp;add&nbsp;the&nbsp;default&nbsp;job&nbsp;server<br /></span><span style="color: #9876AA">$gmc</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">addServer</span><span style="color: #007700">();<br /><br /></span><span style="color: #FF8000">#&nbsp;set&nbsp;the&nbsp;callback&nbsp;for&nbsp;when&nbsp;the&nbsp;job&nbsp;is&nbsp;complete<br /></span><span style="color: #9876AA">$gmc</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">setCompleteCallback</span><span style="color: #007700">(</span><span style="color: #DD0000">"reverse_complete"</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">#&nbsp;add&nbsp;tasks,&nbsp;one&nbsp;of&nbsp;which&nbsp;is&nbsp;low&nbsp;priority<br /></span><span style="color: #9876AA">$task</span><span style="color: #007700">=&nbsp;</span><span style="color: #9876AA">$gmc</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">addTask</span><span style="color: #007700">(</span><span style="color: #DD0000">"reverse"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"Hello&nbsp;World!"</span><span style="color: #007700">,&nbsp;</span><span style="color: #9876AA">null</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"1"</span><span style="color: #007700">);<br /></span><span style="color: #9876AA">$task</span><span style="color: #007700">=&nbsp;</span><span style="color: #9876AA">$gmc</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">addTaskLow</span><span style="color: #007700">(</span><span style="color: #DD0000">"reverse"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"!dlroW&nbsp;olleH"</span><span style="color: #007700">,&nbsp;</span><span style="color: #9876AA">null</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"2"</span><span style="color: #007700">);<br /></span><span style="color: #9876AA">$task</span><span style="color: #007700">=&nbsp;</span><span style="color: #9876AA">$gmc</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">addTask</span><span style="color: #007700">(</span><span style="color: #DD0000">"reverse"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"Hello&nbsp;World!"</span><span style="color: #007700">,&nbsp;</span><span style="color: #9876AA">null</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"3"</span><span style="color: #007700">);<br /><br />if&nbsp;(!&nbsp;</span><span style="color: #9876AA">$gmc</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">runTasks</span><span style="color: #007700">())<br />{<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"ERROR&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #9876AA">$gmc</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">error</span><span style="color: #007700">()&nbsp;.&nbsp;</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;exit;<br />}<br />echo&nbsp;</span><span style="color: #DD0000">"DONE\n"</span><span style="color: #007700">;<br /><br />function&nbsp;</span><span style="color: #9876AA">reverse_complete</span><span style="color: #007700">(</span><span style="color: #9876AA">$task</span><span style="color: #007700">)<br />{<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"COMPLETE:&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #9876AA">$task</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">unique</span><span style="color: #007700">()&nbsp;.&nbsp;</span><span style="color: #DD0000">",&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #9876AA">$task</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">data</span><span style="color: #007700">()&nbsp;.&nbsp;</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br />}<br /><br /></span><span style="color: #9876AA">?&gt;</span> </span> </span></div>     </div>      <div class="example-contents"><p>以上例程的输出类似于：</p></div>     <div class="example-contents screen" style="background:black;padding-left:5px;"> <div class="cdata"><span> COMPLETE: 3, !dlroW olleH COMPLETE: 1, !dlroW olleH COMPLETE: 2, Hello World! DONE </span></div>     </div>    </div>   </span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 seealso" id="refsect1-gearmanclient.addtasklow-seealso">   <h3 class="title">参见</h3>   <span>    <ul class="simplelist">     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::addTask()} - Add a task to be run in parallel</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::addTaskHigh()} - Add a high priority task to run in parallel</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::addTaskBackground()} - Add a background task to be run in parallel</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::addTaskHighBackground()} - Add a high priority background task to be run in parallel</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::addTaskLowBackground()} - Add a low priority background task to be run in parallel</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::runTasks()} - Run a list of tasks in parallel</span></li>    </ul>   </span>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.gearmanclient.php">GearmanClient</a></div></div>
     * @return GearmanTask A GearmanTask object or false if the task could not be added*/
    public function addTaskLow($function_name, $workload, $context = null, $unique = null) {}

/**
*<div id="gearmanclient.addtaskbackground" class="refentry">  <div class="refnamediv">   <h1 class="refname">GearmanClient::addTaskBackground</h1>   <p class="verinfo">(PECL gearman &gt;= 0.5.0)</p><p class="refpurpose"><span class="refname">GearmanClient::addTaskBackground</span> &mdash; <span class="dc-title">Add a background task to be run in parallel</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-gearmanclient.addtaskbackground-description">   <h3 class="title">说明</h3>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.gearmantask.php" class="type GearmanTask" style="color:#EAB766">GearmanTask</a></span> <span class="methodname" style="color:#CC7832"><strong>GearmanClient::addTaskBackground</strong></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$function_name</span></span>    , <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$workload</span></span>    [, <span class="methodparam"><span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/language.pseudo-types.php#language.types.mixed" class="type mixed" style="color:#EAB766">mixed</a></span> <span class="parameter" style="color:#2EACF9">&$context</span></span>    [, <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$unique</span></span>   ]] )</div>    <p class="para rdfs-comment">    Adds a background task to be run in parallel with other tasks.  Call this method for all the tasks    to be run in parallel, then call <span class="methodname" style="color:#CC7832">{@link GearmanClient::runTasks()}</span> to    perform the work.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-gearmanclient.addtaskbackground-parameters">   <h3 class="title">参数</h3>   <span>    <dl>            <dt> <span class="parameter" style="color:#2EACF9">function_name</span></dt>       <dd>        <p class="para">        由程序自动执行的已注册函数。       </p>      </dd>                 <dt> <span class="parameter" style="color:#2EACF9">workload</span></dt>       <dd>        <p class="para">        被处理的序列化数据。       </p>      </dd>                 <dt> <span class="parameter" style="color:#2EACF9">context</span></dt>       <dd>        <p class="para">        与任务关联的应用程序上下文。       </p>      </dd>                 <dt> <span class="parameter" style="color:#2EACF9">unique</span></dt>       <dd>        <p class="para">        用于标识特定任务的唯一性 ID。       </p>      </dd>          </dl>    </span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-gearmanclient.addtaskbackground-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    A <a href="http://php.net/manual/zh/class.gearmantask.php" class="classname">GearmanTask</a> object or <strong><span>FALSE</span></strong> if the task could not be added.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 examples" id="refsect1-gearmanclient.addtaskbackground-examples">   <h3 class="title">范例</h3>   <span>    <div class="example" id="example-5340">     <p><strong>Example #1 Two tasks, one background and one not</strong></p>     <div class="example-contents"><p>      This example illustrates the difference between running a background task      and a normal task.  The client adds two tasks to execute the same function,      but one is added with <span class="methodname" style="color:#CC7832"><strong>addTaskBackground()</strong></span>.  A callback is       set so that progress of the job can be tracked.  A simple worker with an      artificial delay reports on the job progress and the client picks this up      through the callback.  Two workers are run for this example.  Note that the      background task does not show in the client output.     </p></div>     <div class="example-contents"> <div class="phpcode" style="border-color:gray;background:#232525"><span><span style="color: #000000"> <span style="color: #9876AA">&lt;?php<br /><br /></span><span style="color: #FF8000">#&nbsp;The&nbsp;client&nbsp;script<br /><br />#&nbsp;create&nbsp;our&nbsp;gearman&nbsp;client<br /></span><span style="color: #9876AA">$gmc</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #9876AA">GearmanClient</span><span style="color: #007700">();<br /><br /></span><span style="color: #FF8000">#&nbsp;add&nbsp;the&nbsp;default&nbsp;job&nbsp;server<br /></span><span style="color: #9876AA">$gmc</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">addServer</span><span style="color: #007700">();<br /><br /></span><span style="color: #FF8000">#&nbsp;set&nbsp;a&nbsp;couple&nbsp;of&nbsp;callbacks&nbsp;so&nbsp;we&nbsp;can&nbsp;track&nbsp;progress<br /></span><span style="color: #9876AA">$gmc</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">setCompleteCallback</span><span style="color: #007700">(</span><span style="color: #DD0000">"reverse_complete"</span><span style="color: #007700">);<br /></span><span style="color: #9876AA">$gmc</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">setStatusCallback</span><span style="color: #007700">(</span><span style="color: #DD0000">"reverse_status"</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">#&nbsp;add&nbsp;a&nbsp;task&nbsp;for&nbsp;the&nbsp;"reverse"&nbsp;function<br /></span><span style="color: #9876AA">$task</span><span style="color: #007700">=&nbsp;</span><span style="color: #9876AA">$gmc</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">addTask</span><span style="color: #007700">(</span><span style="color: #DD0000">"reverse"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"Hello&nbsp;World!"</span><span style="color: #007700">,&nbsp;</span><span style="color: #9876AA">null</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"1"</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">#&nbsp;add&nbsp;another&nbsp;task,&nbsp;but&nbsp;this&nbsp;one&nbsp;to&nbsp;run&nbsp;in&nbsp;the&nbsp;background<br /></span><span style="color: #9876AA">$task</span><span style="color: #007700">=&nbsp;</span><span style="color: #9876AA">$gmc</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">addTaskBackground</span><span style="color: #007700">(</span><span style="color: #DD0000">"reverse"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"!dlroW&nbsp;olleH"</span><span style="color: #007700">,&nbsp;</span><span style="color: #9876AA">null</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"2"</span><span style="color: #007700">);<br /><br />if&nbsp;(!&nbsp;</span><span style="color: #9876AA">$gmc</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">runTasks</span><span style="color: #007700">())<br />{<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"ERROR&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #9876AA">$gmc</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">error</span><span style="color: #007700">()&nbsp;.&nbsp;</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;exit;<br />}<br /><br />echo&nbsp;</span><span style="color: #DD0000">"DONE\n"</span><span style="color: #007700">;<br /><br />function&nbsp;</span><span style="color: #9876AA">reverse_status</span><span style="color: #007700">(</span><span style="color: #9876AA">$task</span><span style="color: #007700">)<br />{<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"STATUS:&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #9876AA">$task</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">unique</span><span style="color: #007700">()&nbsp;.&nbsp;</span><span style="color: #DD0000">",&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #9876AA">$task</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">jobHandle</span><span style="color: #007700">()&nbsp;.&nbsp;</span><span style="color: #DD0000">"&nbsp;-&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #9876AA">$task</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">taskNumerator</span><span style="color: #007700">()&nbsp;.&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #DD0000">"/"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #9876AA">$task</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">taskDenominator</span><span style="color: #007700">()&nbsp;.&nbsp;</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br />}<br /><br />function&nbsp;</span><span style="color: #9876AA">reverse_complete</span><span style="color: #007700">(</span><span style="color: #9876AA">$task</span><span style="color: #007700">)<br />{<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"COMPLETE:&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #9876AA">$task</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">unique</span><span style="color: #007700">()&nbsp;.&nbsp;</span><span style="color: #DD0000">",&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #9876AA">$task</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">data</span><span style="color: #007700">()&nbsp;.&nbsp;</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br />}<br /><br /></span><span style="color: #9876AA">?&gt;</span> </span> </span></div>     </div>      <div class="example-contents"> <div class="phpcode" style="border-color:gray;background:#232525"><span><span style="color: #000000"> <span style="color: #9876AA">&lt;?php<br /><br /></span><span style="color: #FF8000">#&nbsp;The&nbsp;worker&nbsp;script<br /><br /></span><span style="color: #007700">echo&nbsp;</span><span style="color: #DD0000">"Starting\n"</span><span style="color: #007700">;<br /><br /></span><span style="color: #FF8000">#&nbsp;Create&nbsp;our&nbsp;worker&nbsp;object.<br /></span><span style="color: #9876AA">$gmworker</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #9876AA">GearmanWorker</span><span style="color: #007700">();<br /><br /></span><span style="color: #FF8000">#&nbsp;Add&nbsp;default&nbsp;server&nbsp;(localhost).<br /></span><span style="color: #9876AA">$gmworker</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">addServer</span><span style="color: #007700">();<br /><br /></span><span style="color: #FF8000">#&nbsp;Register&nbsp;function&nbsp;"reverse"&nbsp;with&nbsp;the&nbsp;server.<br /></span><span style="color: #9876AA">$gmworker</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">addFunction</span><span style="color: #007700">(</span><span style="color: #DD0000">"reverse"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"reverse_fn"</span><span style="color: #007700">);<br /><br />print&nbsp;</span><span style="color: #DD0000">"Waiting&nbsp;for&nbsp;job...\n"</span><span style="color: #007700">;<br />while(</span><span style="color: #9876AA">$gmworker</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">work</span><span style="color: #007700">())<br />{<br />&nbsp;&nbsp;if&nbsp;(</span><span style="color: #9876AA">$gmworker</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">returnCode</span><span style="color: #007700">()&nbsp;!=&nbsp;</span><span style="color: #9876AA">GEARMAN_SUCCESS</span><span style="color: #007700">)<br />&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"return_code:&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #9876AA">$gmworker</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">returnCode</span><span style="color: #007700">()&nbsp;.&nbsp;</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;break;<br />&nbsp;&nbsp;}<br />}<br /><br />function&nbsp;</span><span style="color: #9876AA">reverse_fn</span><span style="color: #007700">(</span><span style="color: #9876AA">$job</span><span style="color: #007700">)<br />{<br />&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"Received&nbsp;job:&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #9876AA">$job</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">handle</span><span style="color: #007700">()&nbsp;.&nbsp;</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br /><br />&nbsp;&nbsp;</span><span style="color: #9876AA">$workload&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #9876AA">$job</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">workload</span><span style="color: #007700">();<br />&nbsp;&nbsp;</span><span style="color: #9876AA">$workload_size&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #9876AA">$job</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">workloadSize</span><span style="color: #007700">();<br /><br />&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"Workload:&nbsp;</span><span style="color: #9876AA">$workload</span><span style="color: #DD0000">&nbsp;(</span><span style="color: #9876AA">$workload_size</span><span style="color: #DD0000">)\n"</span><span style="color: #007700">;<br /><br />&nbsp;&nbsp;</span><span style="color: #FF8000">#&nbsp;This&nbsp;status&nbsp;loop&nbsp;is&nbsp;not&nbsp;needed,&nbsp;just&nbsp;showing&nbsp;how&nbsp;it&nbsp;works<br />&nbsp;&nbsp;</span><span style="color: #007700">for&nbsp;(</span><span style="color: #9876AA">$x</span><span style="color: #007700">=&nbsp;</span><span style="color: #9876AA">0</span><span style="color: #007700">;&nbsp;</span><span style="color: #9876AA">$x&nbsp;</span><span style="color: #007700">&lt;&nbsp;</span><span style="color: #9876AA">$workload_size</span><span style="color: #007700">;&nbsp;</span><span style="color: #9876AA">$x</span><span style="color: #007700">++)<br />&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"Sending&nbsp;status:&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;(</span><span style="color: #9876AA">$x&nbsp;</span><span style="color: #007700">+&nbsp;</span><span style="color: #9876AA">1</span><span style="color: #007700">)&nbsp;.&nbsp;</span><span style="color: #DD0000">"/</span><span style="color: #9876AA">$workload_size</span><span style="color: #DD0000">&nbsp;complete\n"</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #9876AA">$job</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">sendStatus</span><span style="color: #007700">(</span><span style="color: #9876AA">$x</span><span style="color: #007700">+</span><span style="color: #9876AA">1</span><span style="color: #007700">,&nbsp;</span><span style="color: #9876AA">$workload_size</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #9876AA">$job</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">sendData</span><span style="color: #007700">(</span><span style="color: #9876AA">substr</span><span style="color: #007700">(</span><span style="color: #9876AA">$workload</span><span style="color: #007700">,&nbsp;</span><span style="color: #9876AA">$x</span><span style="color: #007700">,&nbsp;</span><span style="color: #9876AA">1</span><span style="color: #007700">));<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #9876AA">sleep</span><span style="color: #007700">(</span><span style="color: #9876AA">1</span><span style="color: #007700">);<br />&nbsp;&nbsp;}<br /><br />&nbsp;&nbsp;</span><span style="color: #9876AA">$result</span><span style="color: #007700">=&nbsp;</span><span style="color: #9876AA">strrev</span><span style="color: #007700">(</span><span style="color: #9876AA">$workload</span><span style="color: #007700">);<br />&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"Result:&nbsp;</span><span style="color: #9876AA">$result</span><span style="color: #DD0000">\n"</span><span style="color: #007700">;<br /><br />&nbsp;&nbsp;</span><span style="color: #FF8000">#&nbsp;Return&nbsp;what&nbsp;we&nbsp;want&nbsp;to&nbsp;send&nbsp;back&nbsp;to&nbsp;the&nbsp;client.<br />&nbsp;&nbsp;</span><span style="color: #007700">return&nbsp;</span><span style="color: #9876AA">$result</span><span style="color: #007700">;<br />}<br /><br /></span><span style="color: #9876AA">?&gt;</span> </span> </span></div>     </div>      <div class="example-contents"><p>      Worker output for two workers running:     </p></div>     <div class="example-contents screen" style="background:black;padding-left:5px;"> <div class="cdata"><span> Received job: H:foo.local:65 Workload: !dlroW olleH (12) 1/12 complete Received job: H:foo.local:66 Workload: Hello World! (12) Sending status: 1/12 complete Sending status: 2/12 complete Sending status: 2/12 complete Sending status: 3/12 complete Sending status: 3/12 complete Sending status: 4/12 complete Sending status: 4/12 complete Sending status: 5/12 complete Sending status: 5/12 complete Sending status: 6/12 complete Sending status: 6/12 complete Sending status: 7/12 complete Sending status: 7/12 complete Sending status: 8/12 complete Sending status: 8/12 complete Sending status: 9/12 complete Sending status: 9/12 complete Sending status: 10/12 complete Sending status: 10/12 complete Sending status: 11/12 complete Sending status: 11/12 complete Sending status: 12/12 complete Sending status: 12/12 complete Result: !dlroW olleH Result: Hello World! </span></div>     </div>     <div class="example-contents"><p>      Client output:     </p></div>     <div class="example-contents screen" style="background:black;padding-left:5px;"> <div class="cdata"><span> STATUS: 1, H:foo.local:66 - 1/12 STATUS: 1, H:foo.local:66 - 2/12 STATUS: 1, H:foo.local:66 - 3/12 STATUS: 1, H:foo.local:66 - 4/12 STATUS: 1, H:foo.local:66 - 5/12 STATUS: 1, H:foo.local:66 - 6/12 STATUS: 1, H:foo.local:66 - 7/12 STATUS: 1, H:foo.local:66 - 8/12 STATUS: 1, H:foo.local:66 - 9/12 STATUS: 1, H:foo.local:66 - 10/12 STATUS: 1, H:foo.local:66 - 11/12 STATUS: 1, H:foo.local:66 - 12/12 COMPLETE: 1, !dlroW olleH DONE </span></div>     </div>    </div>   </span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 seealso" id="refsect1-gearmanclient.addtaskbackground-seealso">   <h3 class="title">参见</h3>   <span>    <ul class="simplelist">     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::addTask()} - Add a task to be run in parallel</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::addTaskHigh()} - Add a high priority task to run in parallel</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::addTaskLow()} - Add a low priority task to run in parallel</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::addTaskHighBackground()} - Add a high priority background task to be run in parallel</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::addTaskLowBackground()} - Add a low priority background task to be run in parallel</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::runTasks()} - Run a list of tasks in parallel</span></li>    </ul>   </span>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.gearmanclient.php">GearmanClient</a></div></div>
     * @return GearmanTask A GearmanTask object or false if the task could not be added*/
    public function addTaskBackground($function_name, $workload, $context = null, $unique = null) {}

/**
*<div id="gearmanclient.addtaskhighbackground" class="refentry">  <div class="refnamediv">   <h1 class="refname">GearmanClient::addTaskHighBackground</h1>   <p class="verinfo">(PECL gearman &gt;= 0.5.0)</p><p class="refpurpose"><span class="refname">GearmanClient::addTaskHighBackground</span> &mdash; <span class="dc-title">Add a high priority background task to be run in parallel</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-gearmanclient.addtaskhighbackground-description">   <h3 class="title">说明</h3>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.gearmantask.php" class="type GearmanTask" style="color:#EAB766">GearmanTask</a></span> <span class="methodname" style="color:#CC7832"><strong>GearmanClient::addTaskHighBackground</strong></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$function_name</span></span>    , <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$workload</span></span>    [, <span class="methodparam"><span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/language.pseudo-types.php#language.types.mixed" class="type mixed" style="color:#EAB766">mixed</a></span> <span class="parameter" style="color:#2EACF9">&$context</span></span>    [, <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$unique</span></span>   ]] )</div>    <p class="para rdfs-comment">    Adds a high priority background task to be run in parallel with other tasks.    Call this method for all the tasks to be run in parallel, then call    <span class="methodname" style="color:#CC7832">{@link GearmanClient::runTasks()}</span> to perform the work. Tasks with a high    priority will be selected from the queue before those of normal or low priority.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-gearmanclient.addtaskhighbackground-parameters">   <h3 class="title">参数</h3>   <span>    <dl>            <dt> <span class="parameter" style="color:#2EACF9">function_name</span></dt>       <dd>        <p class="para">        由程序自动执行的已注册函数。       </p>      </dd>                 <dt> <span class="parameter" style="color:#2EACF9">workload</span></dt>       <dd>        <p class="para">        被处理的序列化数据。       </p>      </dd>                 <dt> <span class="parameter" style="color:#2EACF9">context</span></dt>       <dd>        <p class="para">        与任务关联的应用程序上下文。       </p>      </dd>                 <dt> <span class="parameter" style="color:#2EACF9">unique</span></dt>       <dd>        <p class="para">        用于标识特定任务的唯一性 ID。       </p>      </dd>          </dl>    </span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-gearmanclient.addtaskhighbackground-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    A <a href="http://php.net/manual/zh/class.gearmantask.php" class="classname">GearmanTask</a> object or <strong><span>FALSE</span></strong> if the task could not be added.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 seealso" id="refsect1-gearmanclient.addtaskhighbackground-seealso">   <h3 class="title">参见</h3>   <span>    <ul class="simplelist">     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::addTask()} - Add a task to be run in parallel</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::addTaskHigh()} - Add a high priority task to run in parallel</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::addTaskLow()} - Add a low priority task to run in parallel</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::addTaskBackground()} - Add a background task to be run in parallel</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::addTaskLowBackground()} - Add a low priority background task to be run in parallel</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::runTasks()} - Run a list of tasks in parallel</span></li>    </ul>   </span>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.gearmanclient.php">GearmanClient</a></div></div>
     * @return GearmanTask A GearmanTask object or false if the task could not be added*/
    public function addTaskHighBackground($function_name, $workload, $context = null, $unique = null) {}

/**
*<div id="gearmanclient.addtasklowbackground" class="refentry">  <div class="refnamediv">   <h1 class="refname">GearmanClient::addTaskLowBackground</h1>   <p class="verinfo">(PECL gearman &gt;= 0.5.0)</p><p class="refpurpose"><span class="refname">GearmanClient::addTaskLowBackground</span> &mdash; <span class="dc-title">Add a low priority background task to be run in parallel</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-gearmanclient.addtasklowbackground-description">   <h3 class="title">说明</h3>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.gearmantask.php" class="type GearmanTask" style="color:#EAB766">GearmanTask</a></span> <span class="methodname" style="color:#CC7832"><strong>GearmanClient::addTaskLowBackground</strong></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$function_name</span></span>    , <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$workload</span></span>    [, <span class="methodparam"><span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/language.pseudo-types.php#language.types.mixed" class="type mixed" style="color:#EAB766">mixed</a></span> <span class="parameter" style="color:#2EACF9">&$context</span></span>    [, <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$unique</span></span>   ]] )</div>    <p class="para rdfs-comment">    Adds a low priority background task to be run in parallel with other tasks.    Call this method for all the tasks to be run in parallel, then call    <span class="methodname" style="color:#CC7832">{@link GearmanClient::runTasks()}</span> to perform the work. Tasks with a low    priority will be selected from the queue after those of normal or high priority.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-gearmanclient.addtasklowbackground-parameters">   <h3 class="title">参数</h3>   <span>    <dl>            <dt> <span class="parameter" style="color:#2EACF9">function_name</span></dt>       <dd>        <p class="para">        由程序自动执行的已注册函数。       </p>      </dd>                 <dt> <span class="parameter" style="color:#2EACF9">workload</span></dt>       <dd>        <p class="para">        被处理的序列化数据。       </p>      </dd>                 <dt> <span class="parameter" style="color:#2EACF9">context</span></dt>       <dd>        <p class="para">        与任务关联的应用程序上下文。       </p>      </dd>                 <dt> <span class="parameter" style="color:#2EACF9">unique</span></dt>       <dd>        <p class="para">        用于标识特定任务的唯一性 ID。       </p>      </dd>          </dl>    </span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-gearmanclient.addtasklowbackground-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    A <a href="http://php.net/manual/zh/class.gearmantask.php" class="classname">GearmanTask</a> object or <strong><span>FALSE</span></strong> if the task could not be added.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 seealso" id="refsect1-gearmanclient.addtasklowbackground-seealso">   <h3 class="title">参见</h3>   <span>    <ul class="simplelist">     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::addTask()} - Add a task to be run in parallel</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::addTaskHigh()} - Add a high priority task to run in parallel</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::addTaskLow()} - Add a low priority task to run in parallel</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::addTaskBackground()} - Add a background task to be run in parallel</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::addTaskHighBackground()} - Add a high priority background task to be run in parallel</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::runTasks()} - Run a list of tasks in parallel</span></li>    </ul>   </span>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.gearmanclient.php">GearmanClient</a></div></div>
     * @return GearmanTask A GearmanTask object or false if the task could not be added*/
    public function addTaskLowBackground($function_name, $workload, $context = null, $unique = null) {}

/**
*<div id="gearmanclient.addtaskstatus" class="refentry">  <div class="refnamediv">   <h1 class="refname">GearmanClient::addTaskStatus</h1>   <p class="verinfo">(PECL gearman &gt;= 0.5.0)</p><p class="refpurpose"><span class="refname">GearmanClient::addTaskStatus</span> &mdash; <span class="dc-title">Add a task to get status</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-gearmanclient.addtaskstatus-description">   <h3 class="title">说明</h3>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.gearmantask.php" class="type GearmanTask" style="color:#EAB766">GearmanTask</a></span> <span class="methodname" style="color:#CC7832"><strong>GearmanClient::addTaskStatus</strong></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$job_handle</span></span>    [, <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">&$context</span></span>   ] )</div>    <p class="para rdfs-comment">    Used to request status information from the Gearman server, which will call the specified    status callback (set using <span class="methodname" style="color:#CC7832">{@link GearmanClient::setStatusCallback()}</span>).   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-gearmanclient.addtaskstatus-parameters">   <h3 class="title">参数</h3>   <span>    <dl>            <dt> <span class="parameter" style="color:#2EACF9">job_handle</span></dt>       <dd>        <p class="para">        The job handle for the task to get status for       </p>      </dd>                 <dt> <span class="parameter" style="color:#2EACF9">context</span></dt>       <dd>        <p class="para">        Data to be passed to the status callback, generally a reference to an array or object       </p>      </dd>          </dl>    </span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-gearmanclient.addtaskstatus-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    A <a href="http://php.net/manual/zh/class.gearmantask.php" class="classname">GearmanTask</a> object.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 examples" id="refsect1-gearmanclient.addtaskstatus-examples">   <h3 class="title">范例</h3>   <span>    <div class="example" id="example-5343">     <p><strong>Example #1 Monitor completion of multiple background tasks</strong></p>     <div class="example-contents"><p>      An artificial delay is introduced in the worker in this example to simulate      a long running process. There is only one worker running for this example.     </p></div>     <div class="example-contents"> <div class="phpcode" style="border-color:gray;background:#232525"><span><span style="color: #000000"> <span style="color: #9876AA">&lt;?php<br /><br /></span><span style="color: #FF8000">//&nbsp;create&nbsp;our&nbsp;object&nbsp;<br /></span><span style="color: #9876AA">$gmclient</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #9876AA">GearmanClient</span><span style="color: #007700">();<br /><br /></span><span style="color: #FF8000">//&nbsp;add&nbsp;the&nbsp;default&nbsp;server&nbsp;<br /></span><span style="color: #9876AA">$gmclient</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">addServer</span><span style="color: #007700">();<br /><br /></span><span style="color: #FF8000">//&nbsp;start&nbsp;some&nbsp;background&nbsp;jobs&nbsp;and&nbsp;save&nbsp;the&nbsp;handles&nbsp;<br /></span><span style="color: #9876AA">$handles&nbsp;</span><span style="color: #007700">=&nbsp;array();<br /></span><span style="color: #9876AA">$handles</span><span style="color: #007700">[</span><span style="color: #9876AA">0</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #9876AA">$gmclient</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">doBackground</span><span style="color: #007700">(</span><span style="color: #DD0000">"reverse"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"Hello&nbsp;World!"</span><span style="color: #007700">);<br /></span><span style="color: #9876AA">$handles</span><span style="color: #007700">[</span><span style="color: #9876AA">1</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #9876AA">$gmclient</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">doBackground</span><span style="color: #007700">(</span><span style="color: #DD0000">"reverse"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"!dlroW&nbsp;olleH"</span><span style="color: #007700">);<br /><br /></span><span style="color: #9876AA">$gmclient</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">setStatusCallback</span><span style="color: #007700">(</span><span style="color: #DD0000">"reverse_status"</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">//&nbsp;Poll&nbsp;the&nbsp;server&nbsp;to&nbsp;see&nbsp;when&nbsp;those&nbsp;background&nbsp;jobs&nbsp;finish;&nbsp;<br />//&nbsp;a&nbsp;better&nbsp;method&nbsp;would&nbsp;be&nbsp;to&nbsp;use&nbsp;event&nbsp;callbacks&nbsp;<br /></span><span style="color: #007700">do<br />{<br />&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">//&nbsp;Use&nbsp;the&nbsp;context&nbsp;variable&nbsp;to&nbsp;track&nbsp;how&nbsp;many&nbsp;tasks&nbsp;have&nbsp;completed&nbsp;<br />&nbsp;&nbsp;&nbsp;</span><span style="color: #9876AA">$done&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #9876AA">0</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;</span><span style="color: #9876AA">$gmclient</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">addTaskStatus</span><span style="color: #007700">(</span><span style="color: #9876AA">$handles</span><span style="color: #007700">[</span><span style="color: #9876AA">0</span><span style="color: #007700">],&nbsp;&amp;</span><span style="color: #9876AA">$done</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;</span><span style="color: #9876AA">$gmclient</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">addTaskStatus</span><span style="color: #007700">(</span><span style="color: #9876AA">$handles</span><span style="color: #007700">[</span><span style="color: #9876AA">1</span><span style="color: #007700">],&nbsp;&amp;</span><span style="color: #9876AA">$done</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;</span><span style="color: #9876AA">$gmclient</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">runTasks</span><span style="color: #007700">();<br />&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"Done:&nbsp;</span><span style="color: #9876AA">$done</span><span style="color: #DD0000">\n"</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;</span><span style="color: #9876AA">sleep</span><span style="color: #007700">(</span><span style="color: #9876AA">1</span><span style="color: #007700">);<br />}<br />while&nbsp;(</span><span style="color: #9876AA">$done&nbsp;</span><span style="color: #007700">!=&nbsp;</span><span style="color: #9876AA">2</span><span style="color: #007700">);<br /><br />function&nbsp;</span><span style="color: #9876AA">reverse_status</span><span style="color: #007700">(</span><span style="color: #9876AA">$task</span><span style="color: #007700">,&nbsp;</span><span style="color: #9876AA">$done</span><span style="color: #007700">)<br />{<br />&nbsp;&nbsp;&nbsp;if&nbsp;(!</span><span style="color: #9876AA">$task</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">isKnown</span><span style="color: #007700">())<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #9876AA">$done</span><span style="color: #007700">++;<br />}<br /><br /></span><span style="color: #9876AA">?&gt;</span> </span> </span></div>     </div>      <div class="example-contents"><p>以上例程的输出类似于：</p></div>     <div class="example-contents screen" style="background:black;padding-left:5px;"> <div class="cdata"><span> Done: 0 Done: 0 Done: 0 Done: 0 Done: 0 Done: 0 Done: 0 Done: 0 Done: 0 Done: 0 Done: 0 Done: 0 Done: 1 Done: 1 Done: 1 Done: 1 Done: 1 Done: 1 Done: 1 Done: 1 Done: 1 Done: 1 Done: 1 Done: 1 Done: 2 </span></div>     </div>    </div>   </span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 seealso" id="refsect1-gearmanclient.addtaskstatus-seealso">   <h3 class="title">参见</h3>   <span>    <ul class="simplelist">     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::setStatusCallback()} - Set a callback for collecting task status</span></li>    </ul>   </span>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.gearmanclient.php">GearmanClient</a></div></div>
     * @return GearmanTask A GearmanTask object*/
    public function addTaskStatus($job_handle, $context = null) {}

/**
*<div id="gearmanclient.setworkloadcallback" class="refentry">  <div class="refnamediv">   <h1 class="refname">GearmanClient::setWorkloadCallback</h1>   <p class="verinfo">(PECL gearman &gt;= 0.5.0)</p><p class="refpurpose"><span class="refname">GearmanClient::setWorkloadCallback</span> &mdash; <span class="dc-title">Set a callback for accepting incremental data updates</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-gearmanclient.setworkloadcallback-description">   <h3 class="title">说明</h3>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">bool</span> <span class="methodname" style="color:#CC7832"><strong>GearmanClient::setWorkloadCallback</strong></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/language.types.callable.php" class="type callable" style="color:#EAB766">callable</a></span> <span class="parameter" style="color:#2EACF9">$callback</span></span>    )</div>    <p class="para rdfs-comment">    Sets a function to be called when a worker needs to send back data prior to job completion.    A worker can do this when it needs to send updates, send partial results, or flush data    during long running jobs.  The callback should accept a single argument, a     <a href="http://php.net/manual/zh/class.gearmantask.php" class="classname">GearmanTask</a> object.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-gearmanclient.setworkloadcallback-parameters">   <h3 class="title">参数</h3>   <span>    <dl>            <dt> <span class="parameter" style="color:#2EACF9">callback</span></dt>       <dd>        <p class="para">        A function to call       </p>      </dd>          </dl>    </span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-gearmanclient.setworkloadcallback-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    成功时返回 <strong><span>TRUE</span></strong>， 或者在失败时返回 <strong><span>FALSE</span></strong>。   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 seealso" id="refsect1-gearmanclient.setworkloadcallback-seealso">   <h3 class="title">参见</h3>   <span>    <ul class="simplelist">     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::setDataCallback()} - Callback function when there is a data packet for a task</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::setCompleteCallback()} - Set a function to be called on task completion</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::setCreatedCallback()} - Set a callback for when a task is queued</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::setExceptionCallback()} - Set a callback for worker exceptions</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::setFailCallback()} - Set callback for job failure</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::setStatusCallback()} - Set a callback for collecting task status</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::setWarningCallback()} - Set a callback for worker warnings</span></li>    </ul>   </span>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.gearmanclient.php">GearmanClient</a></div></div>
     * @return bool*/
    public function setWorkloadCallback($callback) {}

/**
*<div id="gearmanclient.setcreatedcallback" class="refentry">  <div class="refnamediv">   <h1 class="refname">GearmanClient::setCreatedCallback</h1>   <p class="verinfo">(PECL gearman &gt;= 0.5.0)</p><p class="refpurpose"><span class="refname">GearmanClient::setCreatedCallback</span> &mdash; <span class="dc-title">Set a callback for when a task is queued</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-gearmanclient.setcreatedcallback-description">   <h3 class="title">说明</h3>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">bool</span> <span class="methodname" style="color:#CC7832"><strong>GearmanClient::setCreatedCallback</strong></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$callback</span></span>    )</div>    <p class="para rdfs-comment">    Sets a function to be called when a task is received and queued by the Gearman job server.    The callback should accept a single argument, a <a href="http://php.net/manual/zh/class.gearmantask.php" class="classname">GearmanTask</a> object.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-gearmanclient.setcreatedcallback-parameters">   <h3 class="title">参数</h3>   <span>    <dl>            <dt> <span class="parameter" style="color:#2EACF9">callback</span></dt>       <dd>        <p class="para">        A function to call       </p>      </dd>          </dl>    </span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-gearmanclient.setcreatedcallback-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    成功时返回 <strong><span>TRUE</span></strong>， 或者在失败时返回 <strong><span>FALSE</span></strong>。   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 seealso" id="refsect1-gearmanclient.setcreatedcallback-seealso">   <h3 class="title">参见</h3>   <span>    <ul class="simplelist">     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::setDataCallback()} - Callback function when there is a data packet for a task</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::setCompleteCallback()} - Set a function to be called on task completion</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::setExceptionCallback()} - Set a callback for worker exceptions</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::setFailCallback()} - Set callback for job failure</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::setStatusCallback()} - Set a callback for collecting task status</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::setWarningCallback()} - Set a callback for worker warnings</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::setWorkloadCallback()} - Set a callback for accepting incremental data updates</span></li>    </ul>   </span>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.gearmanclient.php">GearmanClient</a></div></div>
     * @return bool*/
    public function setCreatedCallback($callback) {}

/**
*<div id="gearmanclient.setdatacallback" class="refentry">  <div class="refnamediv">   <h1 class="refname">GearmanClient::setDataCallback</h1>   <p class="verinfo">(PECL gearman &gt;= 0.6.0)</p><p class="refpurpose"><span class="refname">GearmanClient::setDataCallback</span> &mdash; <span class="dc-title">Callback function when there is a data packet for a task</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-gearmanclient.setdatacallback-description">   <h3 class="title">说明</h3>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">bool</span> <span class="methodname" style="color:#CC7832"><strong>GearmanClient::setDataCallback</strong></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/language.types.callable.php" class="type callable" style="color:#EAB766">callable</a></span> <span class="parameter" style="color:#2EACF9">$callback</span></span>    )</div>    <p class="para rdfs-comment">    Sets the callback function for accepting data packets for a task. The callback function should    take a single argument, a <a href="http://php.net/manual/zh/class.gearmantask.php" class="classname">GearmanTask</a> object.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-gearmanclient.setdatacallback-parameters">   <h3 class="title">参数</h3>   <span>    <dl>            <dt> <span class="parameter" style="color:#2EACF9">callback</span></dt>       <dd>        <p class="para">        A function or method to call       </p>      </dd>          </dl>    </span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-gearmanclient.setdatacallback-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    成功时返回 <strong><span>TRUE</span></strong>， 或者在失败时返回 <strong><span>FALSE</span></strong>。   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 seealso" id="refsect1-gearmanclient.setdatacallback-seealso">   <h3 class="title">参见</h3>   <span>    <ul class="simplelist">     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::setCompleteCallback()} - Set a function to be called on task completion</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::setCreatedCallback()} - Set a callback for when a task is queued</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::setExceptionCallback()} - Set a callback for worker exceptions</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::setFailCallback()} - Set callback for job failure</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::setStatusCallback()} - Set a callback for collecting task status</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::setWarningCallback()} - Set a callback for worker warnings</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::setWorkloadCallback()} - Set a callback for accepting incremental data updates</span></li>    </ul>   </span>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.gearmanclient.php">GearmanClient</a></div></div>
     * @return bool*/
    public function setDataCallback($callback) {}

/**
*<div id="gearmanclient.setwarningcallback" class="refentry">  <div class="refnamediv">   <h1 class="refname">GearmanClient::setWarningCallback</h1>   <p class="verinfo">(PECL gearman &gt;= 0.5.0)</p><p class="refpurpose"><span class="refname">GearmanClient::setWarningCallback</span> &mdash; <span class="dc-title">Set a callback for worker warnings</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-gearmanclient.setwarningcallback-description">   <h3 class="title">说明</h3>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">bool</span> <span class="methodname" style="color:#CC7832"><strong>GearmanClient::setWarningCallback</strong></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/language.types.callable.php" class="type callable" style="color:#EAB766">callable</a></span> <span class="parameter" style="color:#2EACF9">$callback</span></span>    )</div>    <p class="para rdfs-comment">    Sets a function to be called when a worker sends a warning.  The callback should accept    a single argument, a <a href="http://php.net/manual/zh/class.gearmantask.php" class="classname">GearmanTask</a> object.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-gearmanclient.setwarningcallback-parameters">   <h3 class="title">参数</h3>   <span>    <dl>            <dt> <span class="parameter" style="color:#2EACF9">callback</span></dt>       <dd>        <p class="para">        A function to call       </p>      </dd>          </dl>    </span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-gearmanclient.setwarningcallback-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    成功时返回 <strong><span>TRUE</span></strong>， 或者在失败时返回 <strong><span>FALSE</span></strong>。   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 seealso" id="refsect1-gearmanclient.setwarningcallback-seealso">   <h3 class="title">参见</h3>   <span>    <ul class="simplelist">     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::setDataCallback()} - Callback function when there is a data packet for a task</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::setCompleteCallback()} - Set a function to be called on task completion</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::setCreatedCallback()} - Set a callback for when a task is queued</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::setExceptionCallback()} - Set a callback for worker exceptions</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::setFailCallback()} - Set callback for job failure</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::setStatusCallback()} - Set a callback for collecting task status</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::setWorkloadCallback()} - Set a callback for accepting incremental data updates</span></li>    </ul>   </span>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.gearmanclient.php">GearmanClient</a></div></div>
     * @return bool*/
    public function setWarningCallback($callback) {}

/**
*<div id="gearmanclient.setstatuscallback" class="refentry">  <div class="refnamediv">   <h1 class="refname">GearmanClient::setStatusCallback</h1>   <p class="verinfo">(PECL gearman &gt;= 0.5.0)</p><p class="refpurpose"><span class="refname">GearmanClient::setStatusCallback</span> &mdash; <span class="dc-title">Set a callback for collecting task status</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-gearmanclient.setstatuscallback-description">   <h3 class="title">说明</h3>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">bool</span> <span class="methodname" style="color:#CC7832"><strong>GearmanClient::setStatusCallback</strong></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/language.types.callable.php" class="type callable" style="color:#EAB766">callable</a></span> <span class="parameter" style="color:#2EACF9">$callback</span></span>    )</div>    <p class="para rdfs-comment">    Sets a callback function used for getting updated status information from a worker.  The function    should accept a single argument, a <a href="http://php.net/manual/zh/class.gearmantask.php" class="classname">GearmanTask</a> object.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-gearmanclient.setstatuscallback-parameters">   <h3 class="title">参数</h3>   <span>    <dl>            <dt> <span class="parameter" style="color:#2EACF9">callback</span></dt>       <dd>        <p class="para">        A function to call       </p>      </dd>          </dl>    </span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-gearmanclient.setstatuscallback-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    成功时返回 <strong><span>TRUE</span></strong>， 或者在失败时返回 <strong><span>FALSE</span></strong>。   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 seealso" id="refsect1-gearmanclient.setstatuscallback-seealso">   <h3 class="title">参见</h3>   <span>    <ul class="simplelist">     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::setDataCallback()} - Callback function when there is a data packet for a task</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::setCompleteCallback()} - Set a function to be called on task completion</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::setCreatedCallback()} - Set a callback for when a task is queued</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::setExceptionCallback()} - Set a callback for worker exceptions</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::setFailCallback()} - Set callback for job failure</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::setWarningCallback()} - Set a callback for worker warnings</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::setWorkloadCallback()} - Set a callback for accepting incremental data updates</span></li>    </ul>   </span>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.gearmanclient.php">GearmanClient</a></div></div>
     * @return bool*/
    public function setStatusCallback($callback) {}

/**
*<div id="gearmanclient.setcompletecallback" class="refentry">  <div class="refnamediv">   <h1 class="refname">GearmanClient::setCompleteCallback</h1>   <p class="verinfo">(PECL gearman &gt;= 0.5.0)</p><p class="refpurpose"><span class="refname">GearmanClient::setCompleteCallback</span> &mdash; <span class="dc-title">Set a function to be called on task completion</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-gearmanclient.setcompletecallback-description">   <h3 class="title">说明</h3>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">bool</span> <span class="methodname" style="color:#CC7832"><strong>GearmanClient::setCompleteCallback</strong></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/language.types.callable.php" class="type callable" style="color:#EAB766">callable</a></span> <span class="parameter" style="color:#2EACF9">$callback</span></span>    )</div>    <p class="para rdfs-comment">    Use to set a function to be called when a <a href="http://php.net/manual/zh/class.gearmantask.php" class="classname">GearmanTask</a> is completed, or    when <span class="methodname" style="color:#CC7832">{@link GearmanJob::sendComplete()}</span> is invoked by a worker (whichever happens    first).   </p>   <p class="para">    This callback executes only when executing a <a href="http://php.net/manual/zh/class.gearmantask.php" class="classname">GearmanTask</a> using    <span class="methodname" style="color:#CC7832">{@link GearmanClient::runTasks()}</span>. It is not used for individual jobs.   </p>    </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-gearmanclient.setcompletecallback-parameters">   <h3 class="title">参数</h3>   <span>    <dl>            <dt> <span class="parameter" style="color:#2EACF9">callback</span></dt>       <dd>        <p class="para">        A function to be called       </p>      </dd>          </dl>    </span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-gearmanclient.setcompletecallback-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    成功时返回 <strong><span>TRUE</span></strong>， 或者在失败时返回 <strong><span>FALSE</span></strong>。   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 seealso" id="refsect1-gearmanclient.setcompletecallback-seealso">   <h3 class="title">参见</h3>   <span>    <ul class="simplelist">     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::setDataCallback()} - Callback function when there is a data packet for a task</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::setCreatedCallback()} - Set a callback for when a task is queued</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::setExceptionCallback()} - Set a callback for worker exceptions</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::setFailCallback()} - Set callback for job failure</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::setStatusCallback()} - Set a callback for collecting task status</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::setWarningCallback()} - Set a callback for worker warnings</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::setWorkloadCallback()} - Set a callback for accepting incremental data updates</span></li>    </ul>   </span>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.gearmanclient.php">GearmanClient</a></div></div>
     * @return bool*/
    public function setCompleteCallback($callback) {}

/**
*<div id="gearmanclient.setexceptioncallback" class="refentry">  <div class="refnamediv">   <h1 class="refname">GearmanClient::setExceptionCallback</h1>   <p class="verinfo">(PECL gearman &gt;= 0.5.0)</p><p class="refpurpose"><span class="refname">GearmanClient::setExceptionCallback</span> &mdash; <span class="dc-title">Set a callback for worker exceptions</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-gearmanclient.setexceptioncallback-description">   <h3 class="title">说明</h3>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">bool</span> <span class="methodname" style="color:#CC7832"><strong>GearmanClient::setExceptionCallback</strong></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/language.types.callable.php" class="type callable" style="color:#EAB766">callable</a></span> <span class="parameter" style="color:#2EACF9">$callback</span></span>    )</div>    <p class="para rdfs-comment">    Specifies a function to call when a worker for a task sends an exception.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-gearmanclient.setexceptioncallback-parameters">   <h3 class="title">参数</h3>   <span>    <dl>            <dt> <span class="parameter" style="color:#2EACF9">callback</span></dt>       <dd>        <p class="para">        Function to call when the worker throws an exception       </p>      </dd>          </dl>    </span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-gearmanclient.setexceptioncallback-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    成功时返回 <strong><span>TRUE</span></strong>， 或者在失败时返回 <strong><span>FALSE</span></strong>。   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 seealso" id="refsect1-gearmanclient.setexceptioncallback-seealso">   <h3 class="title">参见</h3>   <span>    <ul class="simplelist">     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::setDataCallback()} - Callback function when there is a data packet for a task</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::setCompleteCallback()} - Set a function to be called on task completion</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::setCreatedCallback()} - Set a callback for when a task is queued</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::setFailCallback()} - Set callback for job failure</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::setStatusCallback()} - Set a callback for collecting task status</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::setWarningCallback()} - Set a callback for worker warnings</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::setWorkloadCallback()} - Set a callback for accepting incremental data updates</span></li>    </ul>   </span>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.gearmanclient.php">GearmanClient</a></div></div>
     * @return bool*/
    public function setExceptionCallback($callback) {}

/**
*<div id="gearmanclient.setfailcallback" class="refentry">  <div class="refnamediv">   <h1 class="refname">GearmanClient::setFailCallback</h1>   <p class="verinfo">(PECL gearman &gt;= 0.5.0)</p><p class="refpurpose"><span class="refname">GearmanClient::setFailCallback</span> &mdash; <span class="dc-title">Set callback for job failure</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-gearmanclient.setfailcallback-description">   <h3 class="title">说明</h3>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">bool</span> <span class="methodname" style="color:#CC7832"><strong>GearmanClient::setFailCallback</strong></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/language.types.callable.php" class="type callable" style="color:#EAB766">callable</a></span> <span class="parameter" style="color:#2EACF9">$callback</span></span>    )</div>    <p class="para rdfs-comment">    Sets the callback function to be used when a task does not complete successfully.  The function    should accept a single argument, a <a href="http://php.net/manual/zh/class.gearmantask.php" class="classname">GearmanTask</a> object.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-gearmanclient.setfailcallback-parameters">   <h3 class="title">参数</h3>   <span>    <dl>            <dt> <span class="parameter" style="color:#2EACF9">callback</span></dt>       <dd>        <p class="para">        A function to call       </p>      </dd>          </dl>    </span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-gearmanclient.setfailcallback-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    成功时返回 <strong><span>TRUE</span></strong>， 或者在失败时返回 <strong><span>FALSE</span></strong>。   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 seealso" id="refsect1-gearmanclient.setfailcallback-seealso">   <h3 class="title">参见</h3>   <span>    <ul class="simplelist">     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::setDataCallback()} - Callback function when there is a data packet for a task</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::setCompleteCallback()} - Set a function to be called on task completion</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::setCreatedCallback()} - Set a callback for when a task is queued</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::setExceptionCallback()} - Set a callback for worker exceptions</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::setStatusCallback()} - Set a callback for collecting task status</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::setWarningCallback()} - Set a callback for worker warnings</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::setWorkloadCallback()} - Set a callback for accepting incremental data updates</span></li>    </ul>   </span>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.gearmanclient.php">GearmanClient</a></div></div>
     * @return bool*/
    public function setFailCallback($callback) {}

/**
*<div id="gearmanclient.clearcallbacks" class="refentry">  <div class="refnamediv">   <h1 class="refname">GearmanClient::clearCallbacks</h1>   <p class="verinfo">(PECL gearman &gt;= 0.5.0)</p><p class="refpurpose"><span class="refname">GearmanClient::clearCallbacks</span> &mdash; <span class="dc-title">Clear all task callback functions</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-gearmanclient.clearcallbacks-description">   <h3 class="title">说明</h3>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">bool</span> <span class="methodname" style="color:#CC7832"><strong>GearmanClient::clearCallbacks</strong></span>     ( <span class="methodparam">void</span>    )</div>    <p class="para rdfs-comment">    Clears all the task callback functions that have previously been set.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-gearmanclient.clearcallbacks-parameters">   <h3 class="title">参数</h3>   <span>此函数没有参数。</span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-gearmanclient.clearcallbacks-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    Always returns <strong><span>TRUE</span></strong>.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 seealso" id="refsect1-gearmanclient.clearcallbacks-seealso">   <h3 class="title">参见</h3>   <span>    <ul class="simplelist">     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::setDataCallback()} - Callback function when there is a data packet for a task</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::setCompleteCallback()} - Set a function to be called on task completion</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::setCreatedCallback()} - Set a callback for when a task is queued</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::setExceptionCallback()} - Set a callback for worker exceptions</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::setFailCallback()} - Set callback for job failure</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::setStatusCallback()} - Set a callback for collecting task status</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::setWarningCallback()} - Set a callback for worker warnings</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::setWorkloadCallback()} - Set a callback for accepting incremental data updates</span></li>    </ul>   </span>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.gearmanclient.php">GearmanClient</a></div></div>
     * @return bool Always returns true*/
    public function clearCallbacks() {}

/**
*<div id="gearmanclient.runtasks" class="refentry">  <div class="refnamediv">   <h1 class="refname">GearmanClient::runTasks</h1>   <p class="verinfo">(PECL gearman &gt;= 0.5.0)</p><p class="refpurpose"><span class="refname">GearmanClient::runTasks</span> &mdash; <span class="dc-title">Run a list of tasks in parallel</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-gearmanclient.runtasks-description">   <h3 class="title">说明</h3>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">bool</span> <span class="methodname" style="color:#CC7832"><strong>GearmanClient::runTasks</strong></span>     ( <span class="methodparam">void</span>    )</div>    <p class="para rdfs-comment">    For a set of tasks previously added with <span class="methodname" style="color:#CC7832">{@link GearmanClient::addTask()}</span>,    <span class="methodname" style="color:#CC7832">{@link GearmanClient::addTaskHigh()}</span>, <span class="methodname" style="color:#CC7832">{@link GearmanClient::addTaskLow()}</span>,    <span class="methodname" style="color:#CC7832">{@link GearmanClient::addTaskBackground()}</span>, <span class="methodname" style="color:#CC7832">{@link GearmanClient::addTaskHighBackground()}</span>, or    <span class="methodname" style="color:#CC7832">{@link GearmanClient::addTaskLowBackground()}</span>, this call starts running the tasks    in parallel.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-gearmanclient.runtasks-parameters">   <h3 class="title">参数</h3>   <span>此函数没有参数。</span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-gearmanclient.runtasks-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    成功时返回 <strong><span>TRUE</span></strong>， 或者在失败时返回 <strong><span>FALSE</span></strong>。   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 seealso" id="refsect1-gearmanclient.runtasks-seealso">   <h3 class="title">参见</h3>   <span>    <ul class="simplelist">     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::addTask()} - Add a task to be run in parallel</span></li>    </ul>   </span>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.gearmanclient.php">GearmanClient</a></div></div>
     * @return bool*/
    public function runTasks() {}

/**
*<div id="gearmanclient.ping" class="refentry">  <div class="refnamediv">   <h1 class="refname">GearmanClient::ping</h1>   <p class="verinfo">(No version information available, might only be in Git)</p><p class="refpurpose"><span class="refname">GearmanClient::ping</span> &mdash; <span class="dc-title">Send data to all job servers to see if they echo it back</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-gearmanclient.ping-description">   <h3 class="title">说明</h3>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">bool</span> <span class="methodname" style="color:#CC7832"><strong>GearmanClient::ping</strong></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$workload</span></span>    )</div>    <p class="para rdfs-comment">    Sends some arbitrary data to all job servers to see if they echo it back.  The data sent    is not used or processed in any other way.  Primarily used for testing and debugging.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-gearmanclient.ping-parameters">   <h3 class="title">参数</h3>   <span>    <dl>            <dt> <span class="parameter" style="color:#2EACF9">workload</span></dt>       <dd>        <p class="para">        Some arbitrary serialized data to be echo back       </p>      </dd>          </dl>    </span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-gearmanclient.ping-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    成功时返回 <strong><span>TRUE</span></strong>， 或者在失败时返回 <strong><span>FALSE</span></strong>。   </p>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.gearmanclient.php">GearmanClient</a></div></div>
     * @return bool*/
    public function ping($workload) {}
}


/**
*<div id="class.gearmantask" class="reference">   <h1 class="title">The GearmanTask class</h1>     <div class="partintro"><p class="verinfo">(PECL gearman &gt;= 0.5.0)</p>     <div class="section" id="gearmantask.intro">    <h2 class="title">简介</h2>    <p class="para">         </p>   </div>     <div class="section" id="gearmantask.synopsis">    <h2 class="title">类摘要</h2>      <div class="classsynopsis">     <div class="ooclass"></div>       <div class="classsynopsisinfo">      <span class="ooclass">       <strong class="classname">GearmanTask</strong>      </span>      {</div>           <div class="classsynopsisinfo classsynopsisinfo_comment">// 方法 </div>     <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmantask.construct.php" class="methodname" style="color:#CC7832">__construct</a></span>     ( <span class="methodparam">void</span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">GearmanTask</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmantask.create.php" class="methodname" style="color:#CC7832">create</a></span>     ( <span class="methodparam">void</span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">string</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmantask.data.php" class="methodname" style="color:#CC7832">data</a></span>     ( <span class="methodparam">void</span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">int</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmantask.datasize.php" class="methodname" style="color:#CC7832">dataSize</a></span>     ( <span class="methodparam">void</span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">string</span> <span class="methodname" style="color:#CC7832">{@link function}</span>     ( <span class="methodparam">void</span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">string</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmantask.functionname.php" class="methodname" style="color:#CC7832">functionName</a></span>     ( <span class="methodparam">void</span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">bool</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmantask.isknown.php" class="methodname" style="color:#CC7832">isKnown</a></span>     ( <span class="methodparam">void</span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">bool</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmantask.isrunning.php" class="methodname" style="color:#CC7832">isRunning</a></span>     ( <span class="methodparam">void</span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">string</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmantask.jobhandle.php" class="methodname" style="color:#CC7832">jobHandle</a></span>     ( <span class="methodparam">void</span>     )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">array</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmantask.recvdata.php" class="methodname" style="color:#CC7832">recvData</a></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$data_len</span></span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">int</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmantask.returncode.php" class="methodname" style="color:#CC7832">returnCode</a></span>     ( <span class="methodparam">void</span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">int</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmantask.senddata.php" class="methodname" style="color:#CC7832">sendData</a></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$data</span></span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">int</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmantask.sendworkload.php" class="methodname" style="color:#CC7832">sendWorkload</a></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$data</span></span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">int</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmantask.taskdenominator.php" class="methodname" style="color:#CC7832">taskDenominator</a></span>     ( <span class="methodparam">void</span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">int</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmantask.tasknumerator.php" class="methodname" style="color:#CC7832">taskNumerator</a></span>     ( <span class="methodparam">void</span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">string</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmantask.unique.php" class="methodname" style="color:#CC7832">unique</a></span>     ( <span class="methodparam">void</span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">string</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmantask.uuid.php" class="methodname" style="color:#CC7832">uuid</a></span>     ( <span class="methodparam">void</span>    )</div>     }</div>     </div>   </div>                                                                                                                            <h2>Table of Contents</h2><ul class="chunklist chunklist_reference"><li>{@link GearmanTask::__construct} — Create a GearmanTask instance</li><li>{@link GearmanTask::create} — Create a task (deprecated)</li><li>{@link GearmanTask::data} — Get data returned for a task</li><li>{@link GearmanTask::dataSize} — Get the size of returned data</li><li>{@link GearmanTask::function} — Get associated function name (deprecated)</li><li>{@link GearmanTask::functionName} — Get associated function name</li><li>{@link GearmanTask::isKnown} — Determine if task is known</li><li>{@link GearmanTask::isRunning} — Test whether the task is currently running</li><li>{@link GearmanTask::jobHandle} — Get the job handle</li><li>{@link GearmanTask::recvData} — Read work or result data into a buffer for a task</li><li>{@link GearmanTask::returnCode} — Get the last return code</li><li>{@link GearmanTask::sendData} — Send data for a task (deprecated)</li><li>{@link GearmanTask::sendWorkload} — Send data for a task</li><li>{@link GearmanTask::taskDenominator} — Get completion percentage denominator</li><li>{@link GearmanTask::taskNumerator} — Get completion percentage numerator</li><li>{@link GearmanTask::unique} — Get the unique identifier for a task</li><li>{@link GearmanTask::uuid} — Get the unique identifier for a task (deprecated)</li></ul> <div class="up"><a href="http://php.net/manual/zh/book.gearman.php">Gearman</a></div></div>
*/
class GearmanTask {
/**
*<div id="gearmantask.returncode" class="refentry">  <div class="refnamediv">   <h1 class="refname">GearmanTask::returnCode</h1>   <p class="verinfo">(PECL gearman &gt;= 0.5.0)</p><p class="refpurpose"><span class="refname">GearmanTask::returnCode</span> &mdash; <span class="dc-title">Get the last return code</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-gearmantask.returncode-description">   <h3 class="title">说明</h3>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">int</span> <span class="methodname" style="color:#CC7832"><strong>GearmanTask::returnCode</strong></span>     ( <span class="methodparam">void</span>    )</div>    <p class="para rdfs-comment">    Returns the last Gearman return code for this task.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-gearmantask.returncode-parameters">   <h3 class="title">参数</h3>   <span>此函数没有参数。</span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-gearmantask.returncode-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    A valid Gearman return code.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 seealso" id="refsect1-gearmantask.returncode-seealso">   <h3 class="title">参见</h3>   <span>    <ul class="simplelist">     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::returnCode()} - Get the last Gearman return code</span></li>    </ul>   </span>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.gearmantask.php">GearmanTask</a></div></div>
     * @return int A valid Gearman return code*/
    public function returnCode() {}

/**
*<div id="gearmantask.functionname" class="refentry">  <div class="refnamediv">   <h1 class="refname">GearmanTask::functionName</h1>   <p class="verinfo">(PECL gearman &gt;= 0.6.0)</p><p class="refpurpose"><span class="refname">GearmanTask::functionName</span> &mdash; <span class="dc-title">Get associated function name</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-gearmantask.functionname-description">   <h3 class="title">说明</h3>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">string</span> <span class="methodname" style="color:#CC7832"><strong>GearmanTask::functionName</strong></span>     ( <span class="methodparam">void</span>    )</div>    <p class="para rdfs-comment">    Returns the name of the function this task is associated with, i.e., the function    the Gearman worker calls.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-gearmantask.functionname-parameters">   <h3 class="title">参数</h3>   <span>此函数没有参数。</span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-gearmantask.functionname-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    A function name.   </p>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.gearmantask.php">GearmanTask</a></div></div>
     * @return string A function name*/
    public function functionName() {}

/**
*<div id="gearmantask.unique" class="refentry">  <div class="refnamediv">   <h1 class="refname">GearmanTask::unique</h1>   <p class="verinfo">(PECL gearman &gt;= 0.6.0)</p><p class="refpurpose"><span class="refname">GearmanTask::unique</span> &mdash; <span class="dc-title">Get the unique identifier for a task</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-gearmantask.unique-description">   <h3 class="title">说明</h3>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">string</span> <span class="methodname" style="color:#CC7832"><strong>GearmanTask::unique</strong></span>     ( <span class="methodparam">void</span>    )</div>    <p class="para rdfs-comment">    Returns the unique identifier for this task.  This is assigned by the <a href="http://php.net/manual/zh/class.gearmanclient.php" class="classname">GearmanClient</a>,    as opposed to the job handle which is set by the Gearman job server.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-gearmantask.unique-parameters">   <h3 class="title">参数</h3>   <span>此函数没有参数。</span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-gearmantask.unique-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    The unique identifier, or <strong><span>FALSE</span></strong> if no identifier is assigned.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 seealso" id="refsect1-gearmantask.unique-seealso">   <h3 class="title">参见</h3>   <span>    <ul class="simplelist">     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::do()} - Run a single task and return a result [deprecated]</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::addTask()} - Add a task to be run in parallel</span></li>    </ul>   </span>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.gearmantask.php">GearmanTask</a></div></div>
     * @return string The unique identifier, or false if no identifier is assigned*/
    public function unique() {}

/**
*<div id="gearmantask.jobhandle" class="refentry">  <div class="refnamediv">   <h1 class="refname">GearmanTask::jobHandle</h1>   <h1 class="refname">gearman_job_handle</h1>   <p class="verinfo">(PECL gearman &gt;= 0.5.0)</p><p class="refpurpose"><span class="refname">GearmanTask::jobHandle</span> -- <span class="refname">gearman_job_handle</span> &mdash; <span class="dc-title">Get the job handle</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-gearmantask.jobhandle-description">   <h3 class="title">说明</h3>    <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">string</span> <span class="methodname" style="color:#CC7832"><strong>GearmanTask::jobHandle</strong></span>     ( <span class="methodparam">void</span>     )</div>    <p class="para rdfs-comment">    Returns the job handle for this task.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-gearmantask.jobhandle-parameters">   <h3 class="title">参数</h3>   <span>此函数没有参数。</span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-gearmantask.jobhandle-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    The opaque job handle.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 seealso" id="refsect1-gearmantask.jobhandle-seealso">   <h3 class="title">参见</h3>   <span>    <ul class="simplelist">     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::doJobHandle()} - Get the job handle for the running task</span></li>    </ul>   </span>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.gearmantask.php">GearmanTask</a></div></div>
     * @return string The opaque job handle*/
    public function jobHandle() {}

/**
*<div id="gearmantask.isknown" class="refentry">  <div class="refnamediv">   <h1 class="refname">GearmanTask::isKnown</h1>   <p class="verinfo">(PECL gearman &gt;= 0.5.0)</p><p class="refpurpose"><span class="refname">GearmanTask::isKnown</span> &mdash; <span class="dc-title">Determine if task is known</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-gearmantask.isknown-description">   <h3 class="title">说明</h3>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">bool</span> <span class="methodname" style="color:#CC7832"><strong>GearmanTask::isKnown</strong></span>     ( <span class="methodparam">void</span>    )</div>    <p class="para rdfs-comment">    Gets the status information for whether or not this task is known to the job server.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-gearmantask.isknown-parameters">   <h3 class="title">参数</h3>   <span>此函数没有参数。</span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-gearmantask.isknown-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    <strong><span>TRUE</span></strong> if the task is known, <strong><span>FALSE</span></strong> otherwise.   </p>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.gearmantask.php">GearmanTask</a></div></div>
     * @return bool true if the task is known, false otherwise*/
    public function isKnown() {}

/**
*<div id="gearmantask.isrunning" class="refentry">  <div class="refnamediv">   <h1 class="refname">GearmanTask::isRunning</h1>   <p class="verinfo">(PECL gearman &gt;= 0.5.0)</p><p class="refpurpose"><span class="refname">GearmanTask::isRunning</span> &mdash; <span class="dc-title">Test whether the task is currently running</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-gearmantask.isrunning-description">   <h3 class="title">说明</h3>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">bool</span> <span class="methodname" style="color:#CC7832"><strong>GearmanTask::isRunning</strong></span>     ( <span class="methodparam">void</span>    )</div>    <p class="para rdfs-comment">    Indicates whether or not this task is currently running.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-gearmantask.isrunning-parameters">   <h3 class="title">参数</h3>   <span>此函数没有参数。</span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-gearmantask.isrunning-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    <strong><span>TRUE</span></strong> if the task is running, <strong><span>FALSE</span></strong> otherwise.   </p>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.gearmantask.php">GearmanTask</a></div></div>
     * @return bool true if the task is running, false otherwise*/
    public function isRunning() {}

/**
*<div id="gearmantask.tasknumerator" class="refentry">  <div class="refnamediv">   <h1 class="refname">GearmanTask::taskNumerator</h1>   <p class="verinfo">(PECL gearman &gt;= 0.5.0)</p><p class="refpurpose"><span class="refname">GearmanTask::taskNumerator</span> &mdash; <span class="dc-title">Get completion percentage numerator</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-gearmantask.tasknumerator-description">   <h3 class="title">说明</h3>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">int</span> <span class="methodname" style="color:#CC7832"><strong>GearmanTask::taskNumerator</strong></span>     ( <span class="methodparam">void</span>    )</div>    <p class="para rdfs-comment">    Returns the numerator of the percentage of the task that is complete expressed as a fraction.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-gearmantask.tasknumerator-parameters">   <h3 class="title">参数</h3>   <span>此函数没有参数。</span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-gearmantask.tasknumerator-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    A number between 0 and 100, or <strong><span>FALSE</span></strong> if cannot be determined.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 seealso" id="refsect1-gearmantask.tasknumerator-seealso">   <h3 class="title">参见</h3>   <span>    <ul class="simplelist">     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanTask::taskDenominator()} - Get completion percentage denominator</span></li>    </ul>   </span>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.gearmantask.php">GearmanTask</a></div></div>
     * @return int A number between 0 and 100, or false if cannot be determined*/
    public function taskNumerator() {}

/**
*<div id="gearmantask.taskdenominator" class="refentry">  <div class="refnamediv">   <h1 class="refname">GearmanTask::taskDenominator</h1>   <p class="verinfo">(PECL gearman &gt;= 0.5.0)</p><p class="refpurpose"><span class="refname">GearmanTask::taskDenominator</span> &mdash; <span class="dc-title">Get completion percentage denominator</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-gearmantask.taskdenominator-description">   <h3 class="title">说明</h3>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">int</span> <span class="methodname" style="color:#CC7832"><strong>GearmanTask::taskDenominator</strong></span>     ( <span class="methodparam">void</span>    )</div>    <p class="para rdfs-comment">    Returns the denominator of the percentage of the task that is complete expressed as a fraction.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-gearmantask.taskdenominator-parameters">   <h3 class="title">参数</h3>   <span>此函数没有参数。</span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-gearmantask.taskdenominator-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    A number between 0 and 100, or <strong><span>FALSE</span></strong> if cannot be determined.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 seealso" id="refsect1-gearmantask.taskdenominator-seealso">   <h3 class="title">参见</h3>   <span>    <ul class="simplelist">     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanTask::taskNumerator()} - Get completion percentage numerator</span></li>    </ul>   </span>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.gearmantask.php">GearmanTask</a></div></div>
     * @return int A number between 0 and 100, or false if cannot be determined*/
    public function taskDenominator() {}

/**
*<div id="gearmantask.sendworkload" class="refentry">  <div class="refnamediv">   <h1 class="refname">GearmanTask::sendWorkload</h1>   <p class="verinfo">(PECL gearman &gt;= 0.6.0)</p><p class="refpurpose"><span class="refname">GearmanTask::sendWorkload</span> &mdash; <span class="dc-title">Send data for a task</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-gearmantask.sendworkload-description">   <h3 class="title">说明</h3>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">int</span> <span class="methodname" style="color:#CC7832"><strong>GearmanTask::sendWorkload</strong></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$data</span></span>    )</div>    <p class="para rdfs-comment">   </p>   <div class="warning"><strong class="warning">Warning</strong><p class="simpara">此函数是<em class="emphasis">实验性</em>的。此函数的表象，包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担 。</p></div>   </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-gearmantask.sendworkload-parameters">   <h3 class="title">参数</h3>   <span>    <dl>            <dt> <span class="parameter" style="color:#2EACF9">data</span></dt>       <dd>        <p class="para">        Data to send to the worker.       </p>      </dd>          </dl>    </span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-gearmantask.sendworkload-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    The length of data sent, or <strong><span>FALSE</span></strong> if the send failed.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 seealso" id="refsect1-gearmantask.sendworkload-seealso">   <h3 class="title">参见</h3>   <span>    <ul class="simplelist">     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanTask::recvData()} - Read work or result data into a buffer for a task</span></li>    </ul>   </span>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.gearmantask.php">GearmanTask</a></div></div>
     * @return int The length of data sent, or false if the send failed*/
    public function sendWorkload($data) {}

/**
*<div id="gearmantask.data" class="refentry">  <div class="refnamediv">   <h1 class="refname">GearmanTask::data</h1>   <p class="verinfo">(PECL gearman &gt;= 0.5.0)</p><p class="refpurpose"><span class="refname">GearmanTask::data</span> &mdash; <span class="dc-title">Get data returned for a task</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-gearmantask.data-description">   <h3 class="title">说明</h3>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">string</span> <span class="methodname" style="color:#CC7832"><strong>GearmanTask::data</strong></span>     ( <span class="methodparam">void</span>    )</div>    <p class="para rdfs-comment">    Returns data being returned for a task by a worker.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-gearmantask.data-parameters">   <h3 class="title">参数</h3>   <span>此函数没有参数。</span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-gearmantask.data-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    The serialized data, or <strong><span>FALSE</span></strong> if no data is present.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 seealso" id="refsect1-gearmantask.data-seealso">   <h3 class="title">参见</h3>   <span>    <ul class="simplelist">     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanTask::dataSize()} - Get the size of returned data</span></li>    </ul>   </span>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.gearmantask.php">GearmanTask</a></div></div>
     * @return string The serialized data, or false if no data is present*/
    public function data() {}

/**
*<div id="gearmantask.datasize" class="refentry">  <div class="refnamediv">   <h1 class="refname">GearmanTask::dataSize</h1>   <p class="verinfo">(PECL gearman &gt;= 0.5.0)</p><p class="refpurpose"><span class="refname">GearmanTask::dataSize</span> &mdash; <span class="dc-title">Get the size of returned data</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-gearmantask.datasize-description">   <h3 class="title">说明</h3>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">int</span> <span class="methodname" style="color:#CC7832"><strong>GearmanTask::dataSize</strong></span>     ( <span class="methodparam">void</span>    )</div>    <p class="para rdfs-comment">    Returns the size of the data being returned for a task.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-gearmantask.datasize-parameters">   <h3 class="title">参数</h3>   <span>此函数没有参数。</span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-gearmantask.datasize-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    The data size, or <strong><span>FALSE</span></strong> if there is no data.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 seealso" id="refsect1-gearmantask.datasize-seealso">   <h3 class="title">参见</h3>   <span>    <ul class="simplelist">     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanTask::data()} - Get data returned for a task</span></li>    </ul>   </span>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.gearmantask.php">GearmanTask</a></div></div>
     * @return int The data size, or false if there is no data*/
    public function dataSize() {}

/**
*<div id="gearmantask.recvdata" class="refentry">  <div class="refnamediv">   <h1 class="refname">GearmanTask::recvData</h1>   <p class="verinfo">(PECL gearman &gt;= 0.5.0)</p><p class="refpurpose"><span class="refname">GearmanTask::recvData</span> &mdash; <span class="dc-title">Read work or result data into a buffer for a task</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-gearmantask.recvdata-description">   <h3 class="title">说明</h3>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">array</span> <span class="methodname" style="color:#CC7832"><strong>GearmanTask::recvData</strong></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$data_len</span></span>    )</div>    <p class="para rdfs-comment">   </p>   <div class="warning"><strong class="warning">Warning</strong><p class="simpara">此函数是<em class="emphasis">实验性</em>的。此函数的表象，包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担 。</p></div>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-gearmantask.recvdata-parameters">   <h3 class="title">参数</h3>   <span>    <dl>            <dt> <span class="parameter" style="color:#2EACF9">data_len</span></dt>       <dd>        <p class="para">        Length of data to be read.       </p>      </dd>          </dl>    </span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-gearmantask.recvdata-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    An array whose first element is the length of data read and the second is the data buffer.    Returns <strong><span>FALSE</span></strong> if the read failed.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 seealso" id="refsect1-gearmantask.recvdata-seealso">   <h3 class="title">参见</h3>   <span>    <ul class="simplelist">     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanTask::sendData()} - Send data for a task (deprecated)</span></li>    </ul>   </span>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.gearmantask.php">GearmanTask</a></div></div>
     * @return array An array whose first element is the length of data read and the second is*/
    public function recvData($data_len) {}
}


/**
*<div id="class.gearmanworker" class="reference">   <h1 class="title">The GearmanWorker class</h1>     <div class="partintro"><p class="verinfo">(PECL gearman &gt;= 0.5.0)</p>     <div class="section" id="gearmanworker.intro">    <h2 class="title">简介</h2>    <p class="para">         </p>   </div>     <div class="section" id="gearmanworker.synopsis">    <h2 class="title">类摘要</h2>      <div class="classsynopsis">     <div class="ooclass"></div>       <div class="classsynopsisinfo">      <span class="ooclass">       <strong class="classname">GearmanWorker</strong>      </span>      {</div>           <div class="classsynopsisinfo classsynopsisinfo_comment">// 方法 </div>     <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">bool</span> <span class="methodname" style="color:#CC7832">{@link addFunction}</span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$function_name</span></span>    , <span class="methodparam"><span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/language.types.callable.php" class="type callable" style="color:#EAB766">callable</a></span> <span class="parameter" style="color:#2EACF9">$function</span></span>    [, <span class="methodparam"><span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/language.pseudo-types.php#language.types.mixed" class="type mixed" style="color:#EAB766">mixed</a></span> <span class="parameter" style="color:#2EACF9">&$context</span></span>    [, <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$timeout</span></span>   ]] )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">bool</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmanworker.addoptions.php" class="methodname" style="color:#CC7832">addOptions</a></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$option</span></span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">bool</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmanworker.addserver.php" class="methodname" style="color:#CC7832">addServer</a></span>     ([ <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$host</span><span class="initializer"> = 127.0.0.1</span></span>    [, <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$port</span><span class="initializer"> = 4730</span></span>   ]] )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">bool</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmanworker.addservers.php" class="methodname" style="color:#CC7832">addServers</a></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$servers</span><span class="initializer"> = 127.0.0.1:4730</span></span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">void</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmanworker.clone.php" class="methodname" style="color:#CC7832">clone</a></span>     ( <span class="methodparam">void</span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmanworker.construct.php" class="methodname" style="color:#CC7832">__construct</a></span>     ( <span class="methodparam">void</span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">bool</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmanworker.echo.php" class="methodname" style="color:#CC7832">echo</a></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$workload</span></span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">string</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmanworker.error.php" class="methodname" style="color:#CC7832">error</a></span>     ( <span class="methodparam">void</span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">int</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmanworker.geterrno.php" class="methodname" style="color:#CC7832">getErrno</a></span>     ( <span class="methodparam">void</span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">int</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmanworker.options.php" class="methodname" style="color:#CC7832">options</a></span>     ( <span class="methodparam">void</span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">bool</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmanworker.register.php" class="methodname" style="color:#CC7832">register</a></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$function_name</span></span>    [, <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$timeout</span></span>   ] )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">bool</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmanworker.removeoptions.php" class="methodname" style="color:#CC7832">removeOptions</a></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$option</span></span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">int</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmanworker.returncode.php" class="methodname" style="color:#CC7832">returnCode</a></span>     ( <span class="methodparam">void</span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">bool</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmanworker.setid.php" class="methodname" style="color:#CC7832">setId</a></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$id</span></span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">bool</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmanworker.setoptions.php" class="methodname" style="color:#CC7832">setOptions</a></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$option</span></span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">bool</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmanworker.settimeout.php" class="methodname" style="color:#CC7832">setTimeout</a></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$timeout</span></span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">int</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmanworker.timeout.php" class="methodname" style="color:#CC7832">timeout</a></span>     ( <span class="methodparam">void</span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">bool</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmanworker.unregister.php" class="methodname" style="color:#CC7832">unregister</a></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$function_name</span></span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">bool</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmanworker.unregisterall.php" class="methodname" style="color:#CC7832">unregisterAll</a></span>     ( <span class="methodparam">void</span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">bool</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmanworker.wait.php" class="methodname" style="color:#CC7832">wait</a></span>     ( <span class="methodparam">void</span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">bool</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmanworker.work.php" class="methodname" style="color:#CC7832">work</a></span>     ( <span class="methodparam">void</span>    )</div>     }</div>     </div>   </div>                                                                                                                                                        <h2>Table of Contents</h2><ul class="chunklist chunklist_reference"><li>{@link GearmanWorker::addFunction} — Register and add callback function</li><li>{@link GearmanWorker::addOptions} — Add worker options</li><li>{@link GearmanWorker::addServer} — Add a job server</li><li>{@link GearmanWorker::addServers} — Add job servers</li><li>{@link GearmanWorker::clone} — Create a copy of the worker</li><li>{@link GearmanWorker::__construct} — Create a GearmanWorker instance</li><li>{@link GearmanWorker::echo} — Test job server response</li><li>{@link GearmanWorker::error} — Get the last error encountered</li><li>{@link GearmanWorker::getErrno} — Get errno</li><li>{@link GearmanWorker::options} — Get worker options</li><li>{@link GearmanWorker::register} — Register a function with the job server</li><li>{@link GearmanWorker::removeOptions} — Remove worker options</li><li>{@link GearmanWorker::returnCode} — Get last Gearman return code</li><li>{@link GearmanWorker::setId} — Give the worker an identifier so it can be tracked when asking gearmand for the list of available workers</li><li>{@link GearmanWorker::setOptions} — Set worker options</li><li>{@link GearmanWorker::setTimeout} — Set socket I/O activity timeout</li><li>{@link GearmanWorker::timeout} — Get socket I/O activity timeout</li><li>{@link GearmanWorker::unregister} — Unregister a function name with the job servers</li><li>{@link GearmanWorker::unregisterAll} — Unregister all function names with the job servers</li><li>{@link GearmanWorker::wait} — Wait for activity from one of the job servers</li><li>{@link GearmanWorker::work} — Wait for and perform jobs</li></ul> <div class="up"><a href="http://php.net/manual/zh/book.gearman.php">Gearman</a></div></div>
*/
class GearmanWorker {
    /**
     * Creates a GearmanWorker instance representing a worker that connects to the job
     * server and accepts tasks to run.
     *
     * @link http://php.net/manual/en/gearmanworker.construct.php
     * @return  A GearmanWorker object
     */
    public function __construct() {}

/**
*<div id="gearmanworker.returncode" class="refentry">  <div class="refnamediv">   <h1 class="refname">GearmanWorker::returnCode</h1>   <p class="verinfo">(PECL gearman &gt;= 0.5.0)</p><p class="refpurpose"><span class="refname">GearmanWorker::returnCode</span> &mdash; <span class="dc-title">Get last Gearman return code</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-gearmanworker.returncode-description">   <h3 class="title">说明</h3>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">int</span> <span class="methodname" style="color:#CC7832"><strong>GearmanWorker::returnCode</strong></span>     ( <span class="methodparam">void</span>    )</div>    <p class="para rdfs-comment">    Returns the last Gearman return code.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-gearmanworker.returncode-parameters">   <h3 class="title">参数</h3>   <span>此函数没有参数。</span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-gearmanworker.returncode-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    A valid Gearman return code.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 seealso" id="refsect1-gearmanworker.returncode-seealso">   <h3 class="title">参见</h3>   <span>    <ul class="simplelist">     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanWorker::error()} - Get the last error encountered</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanWorker::getErrno()} - Get errno</span></li>    </ul>   </span>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.gearmanworker.php">GearmanWorker</a></div></div>
     * @return int A valid Gearman return code*/
    public function returnCode() {}

/**
*<div id="gearmanworker.error" class="refentry">  <div class="refnamediv">   <h1 class="refname">GearmanWorker::error</h1>   <p class="verinfo">(PECL gearman &gt;= 0.5.0)</p><p class="refpurpose"><span class="refname">GearmanWorker::error</span> &mdash; <span class="dc-title">Get the last error encountered</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-gearmanworker.error-description">   <h3 class="title">说明</h3>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">string</span> <span class="methodname" style="color:#CC7832"><strong>GearmanWorker::error</strong></span>     ( <span class="methodparam">void</span>    )</div>    <p class="para rdfs-comment">    Returns an error string for the last error encountered.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-gearmanworker.error-parameters">   <h3 class="title">参数</h3>   <span>此函数没有参数。</span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-gearmanworker.error-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    An error string.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 seealso" id="refsect1-gearmanworker.error-seealso">   <h3 class="title">参见</h3>   <span>    <ul class="simplelist">     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanWorker::getErrno()} - Get errno</span></li>    </ul>   </span>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.gearmanworker.php">GearmanWorker</a></div></div>
     * @return string An error string*/
    public function error() {}

/**
*<div id="gearmanworker.geterrno" class="refentry">  <div class="refnamediv">   <h1 class="refname">GearmanWorker::getErrno</h1>   <p class="verinfo">(PECL gearman &gt;= 0.5.0)</p><p class="refpurpose"><span class="refname">GearmanWorker::getErrno</span> &mdash; <span class="dc-title">Get errno</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-gearmanworker.geterrno-description">   <h3 class="title">说明</h3>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">int</span> <span class="methodname" style="color:#CC7832"><strong>GearmanWorker::getErrno</strong></span>     ( <span class="methodparam">void</span>    )</div>    <p class="para rdfs-comment">    Returns the value of errno in the case of a GEARMAN_ERRNO return value.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-gearmanworker.geterrno-parameters">   <h3 class="title">参数</h3>   <span>此函数没有参数。</span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-gearmanworker.geterrno-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    A valid errno.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 seealso" id="refsect1-gearmanworker.geterrno-seealso">   <h3 class="title">参见</h3>   <span>    <ul class="simplelist">     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanWorker::error()} - Get the last error encountered</span></li>    </ul>   </span>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.gearmanworker.php">GearmanWorker</a></div></div>
     * @return int A valid errno*/
    public function getErrno() {}

/**
*<div id="gearmanworker.options" class="refentry">  <div class="refnamediv">   <h1 class="refname">GearmanWorker::options</h1>   <p class="verinfo">(PECL gearman &gt;= 0.6.0)</p><p class="refpurpose"><span class="refname">GearmanWorker::options</span> &mdash; <span class="dc-title">Get worker options</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-gearmanworker.options-description">   <h3 class="title">说明</h3>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">int</span> <span class="methodname" style="color:#CC7832"><strong>GearmanWorker::options</strong></span>     ( <span class="methodparam">void</span>    )</div>    <p class="para rdfs-comment">    Gets the options previously set for the worker.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-gearmanworker.options-parameters">   <h3 class="title">参数</h3>   <span>此函数没有参数。</span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-gearmanworker.options-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    The options currently set for the worker.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 seealso" id="refsect1-gearmanworker.options-seealso">   <h3 class="title">参见</h3>   <span>    <ul class="simplelist">     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanWorker::setOptions()} - Set worker options</span></li>    </ul>   </span>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.gearmanworker.php">GearmanWorker</a></div></div>
     * @return int The options currently set for the worker*/
    public function options() {}

/**
*<div id="gearmanworker.setoptions" class="refentry">  <div class="refnamediv">   <h1 class="refname">GearmanWorker::setOptions</h1>   <p class="verinfo">(PECL gearman &gt;= 0.5.0)</p><p class="refpurpose"><span class="refname">GearmanWorker::setOptions</span> &mdash; <span class="dc-title">Set worker options</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-gearmanworker.setoptions-description">   <h3 class="title">说明</h3>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">bool</span> <span class="methodname" style="color:#CC7832"><strong>GearmanWorker::setOptions</strong></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$option</span></span>    )</div>    <p class="para rdfs-comment">    Sets one or more options to the supplied value.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-gearmanworker.setoptions-parameters">   <h3 class="title">参数</h3>   <span>    <dl>            <dt> <span class="parameter" style="color:#2EACF9">option</span></dt>       <dd>        <p class="para">        The options to be set       </p>      </dd>          </dl>    </span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-gearmanworker.setoptions-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    Always returns <strong><span>TRUE</span></strong>.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 seealso" id="refsect1-gearmanworker.setoptions-seealso">   <h3 class="title">参见</h3>   <span>    <ul class="simplelist">     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanWorker::options()} - Get worker options</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanWorker::addOptions()} - Add worker options</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanWorker::removeOptions()} - Remove worker options</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::setOptions()} - Set client options</span></li>    </ul>   </span>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.gearmanworker.php">GearmanWorker</a></div></div>
     * @return bool Always returns true*/
    public function setOptions($option) {}

/**
*<div id="gearmanworker.addoptions" class="refentry">  <div class="refnamediv">   <h1 class="refname">GearmanWorker::addOptions</h1>   <p class="verinfo">(PECL gearman &gt;= 0.6.0)</p><p class="refpurpose"><span class="refname">GearmanWorker::addOptions</span> &mdash; <span class="dc-title">Add worker options</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-gearmanworker.addoptions-description">   <h3 class="title">说明</h3>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">bool</span> <span class="methodname" style="color:#CC7832"><strong>GearmanWorker::addOptions</strong></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$option</span></span>    )</div>    <p class="para rdfs-comment">    Adds one or more options to the options previously set.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-gearmanworker.addoptions-parameters">   <h3 class="title">参数</h3>   <span>    <dl>            <dt> <span class="parameter" style="color:#2EACF9">option</span></dt>       <dd>        <p class="para">        The options to be added       </p>      </dd>          </dl>    </span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-gearmanworker.addoptions-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    Always returns <strong><span>TRUE</span></strong>.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 seealso" id="refsect1-gearmanworker.addoptions-seealso">   <h3 class="title">参见</h3>   <span>    <ul class="simplelist">     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanWorker::options()} - Get worker options</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::setOptions()} - Set client options</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::removeOptions()} - Remove client options</span></li>    </ul>   </span>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.gearmanworker.php">GearmanWorker</a></div></div>
     * @return bool Always returns true*/
    public function addOptions($option) {}

/**
*<div id="gearmanworker.removeoptions" class="refentry">  <div class="refnamediv">   <h1 class="refname">GearmanWorker::removeOptions</h1>   <p class="verinfo">(PECL gearman &gt;= 0.6.0)</p><p class="refpurpose"><span class="refname">GearmanWorker::removeOptions</span> &mdash; <span class="dc-title">Remove worker options</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-gearmanworker.removeoptions-description">   <h3 class="title">说明</h3>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">bool</span> <span class="methodname" style="color:#CC7832"><strong>GearmanWorker::removeOptions</strong></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$option</span></span>    )</div>    <p class="para rdfs-comment">    Removes (unsets) one or more worker options.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-gearmanworker.removeoptions-parameters">   <h3 class="title">参数</h3>   <span>    <dl>            <dt> <span class="parameter" style="color:#2EACF9">option</span></dt>       <dd>        <p class="para">        The options to be removed (unset)       </p>      </dd>          </dl>    </span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-gearmanworker.removeoptions-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    Always returns <strong><span>TRUE</span></strong>.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 seealso" id="refsect1-gearmanworker.removeoptions-seealso">   <h3 class="title">参见</h3>   <span>    <ul class="simplelist">     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanWorker::options()} - Get worker options</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanWorker::setOptions()} - Set worker options</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanWorker::addOptions()} - Add worker options</span></li>    </ul>   </span>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.gearmanworker.php">GearmanWorker</a></div></div>
     * @return bool Always returns true*/
    public function removeOptions($option) {}

/**
*<div id="gearmanworker.timeout" class="refentry">  <div class="refnamediv">   <h1 class="refname">GearmanWorker::timeout</h1>   <p class="verinfo">(PECL gearman &gt;= 0.6.0)</p><p class="refpurpose"><span class="refname">GearmanWorker::timeout</span> &mdash; <span class="dc-title">Get socket I/O activity timeout</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-gearmanworker.timeout-description">   <h3 class="title">说明</h3>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">int</span> <span class="methodname" style="color:#CC7832"><strong>GearmanWorker::timeout</strong></span>     ( <span class="methodparam">void</span>    )</div>    <p class="para rdfs-comment">    Returns the current time to wait, in milliseconds, for socket I/O activity.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-gearmanworker.timeout-parameters">   <h3 class="title">参数</h3>   <span>此函数没有参数。</span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-gearmanworker.timeout-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    A time period is milliseconds.  A negative value indicates an infinite timeout.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 seealso" id="refsect1-gearmanworker.timeout-seealso">   <h3 class="title">参见</h3>   <span>    <ul class="simplelist">     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanWorker::setTimeout()} - Set socket I/O activity timeout</span></li>    </ul>   </span>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.gearmanworker.php">GearmanWorker</a></div></div>
     * @return int A time period is milliseconds. A negative value indicates an infinite*/
    public function timeout() {}

/**
*<div id="gearmanworker.settimeout" class="refentry">  <div class="refnamediv">   <h1 class="refname">GearmanWorker::setTimeout</h1>   <p class="verinfo">(PECL gearman &gt;= 0.6.0)</p><p class="refpurpose"><span class="refname">GearmanWorker::setTimeout</span> &mdash; <span class="dc-title">Set socket I/O activity timeout</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-gearmanworker.settimeout-description">   <h3 class="title">说明</h3>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">bool</span> <span class="methodname" style="color:#CC7832"><strong>GearmanWorker::setTimeout</strong></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$timeout</span></span>    )</div>    <p class="para rdfs-comment">    Sets the interval of time to wait for socket I/O activity.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-gearmanworker.settimeout-parameters">   <h3 class="title">参数</h3>   <span>    <dl>            <dt> <span class="parameter" style="color:#2EACF9">timeout</span></dt>       <dd>        <p class="para">        An interval of time in milliseconds.  A negative value indicates an infinite timeout.       </p>      </dd>          </dl>    </span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-gearmanworker.settimeout-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    Always returns <strong><span>TRUE</span></strong>.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 examples" id="refsect1-gearmanworker.settimeout-examples">   <h3 class="title">范例</h3>   <span>    <div class="example" id="example-5355">     <p><strong>Example #1 A simple worker with a 5 second timeout</strong></p>     <div class="example-contents"> <div class="phpcode" style="border-color:gray;background:#232525"><span><span style="color: #000000"> <span style="color: #9876AA">&lt;?php<br /><br /></span><span style="color: #007700">echo&nbsp;</span><span style="color: #DD0000">"Starting\n"</span><span style="color: #007700">;<br /><br /></span><span style="color: #FF8000">#&nbsp;Create&nbsp;our&nbsp;worker&nbsp;object.<br /></span><span style="color: #9876AA">$gmworker</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #9876AA">GearmanWorker</span><span style="color: #007700">();<br /><br /></span><span style="color: #FF8000">#&nbsp;Add&nbsp;default&nbsp;server&nbsp;(localhost).<br /></span><span style="color: #9876AA">$gmworker</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">addServer</span><span style="color: #007700">();<br /><br /></span><span style="color: #FF8000">#&nbsp;Register&nbsp;function&nbsp;"reverse"&nbsp;with&nbsp;the&nbsp;server.<br /></span><span style="color: #9876AA">$gmworker</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">addFunction</span><span style="color: #007700">(</span><span style="color: #DD0000">"reverse"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"reverse_fn"</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">#&nbsp;Set&nbsp;the&nbsp;timeout&nbsp;to&nbsp;5&nbsp;seconds<br /></span><span style="color: #9876AA">$gmworker</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">setTimeout</span><span style="color: #007700">(</span><span style="color: #9876AA">5000</span><span style="color: #007700">);<br /><br />echo&nbsp;</span><span style="color: #DD0000">"Waiting&nbsp;for&nbsp;job...\n"</span><span style="color: #007700">;<br />while(@</span><span style="color: #9876AA">$gmworker</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">work</span><span style="color: #007700">()&nbsp;||&nbsp;</span><span style="color: #9876AA">$gmworker</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">returnCode</span><span style="color: #007700">()&nbsp;==&nbsp;</span><span style="color: #9876AA">GEARMAN_TIMEOUT</span><span style="color: #007700">)<br />{<br />&nbsp;&nbsp;if&nbsp;(</span><span style="color: #9876AA">$gmworker</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">returnCode</span><span style="color: #007700">()&nbsp;==&nbsp;</span><span style="color: #9876AA">GEARMAN_TIMEOUT</span><span style="color: #007700">)<br />&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">#&nbsp;Normally&nbsp;one&nbsp;would&nbsp;want&nbsp;to&nbsp;do&nbsp;something&nbsp;useful&nbsp;here&nbsp;...<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">echo&nbsp;</span><span style="color: #DD0000">"Timeout.&nbsp;Waiting&nbsp;for&nbsp;next&nbsp;job...\n"</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;continue;<br />&nbsp;&nbsp;}<br /><br />&nbsp;&nbsp;if&nbsp;(</span><span style="color: #9876AA">$gmworker</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">returnCode</span><span style="color: #007700">()&nbsp;!=&nbsp;</span><span style="color: #9876AA">GEARMAN_SUCCESS</span><span style="color: #007700">)<br />&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"return_code:&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #9876AA">$gmworker</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">returnCode</span><span style="color: #007700">()&nbsp;.&nbsp;</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;break;<br />&nbsp;&nbsp;}<br />}<br /><br />echo&nbsp;</span><span style="color: #DD0000">"Done\n"</span><span style="color: #007700">;<br /><br />function&nbsp;</span><span style="color: #9876AA">reverse_fn</span><span style="color: #007700">(</span><span style="color: #9876AA">$job</span><span style="color: #007700">)<br />{<br />&nbsp;&nbsp;return&nbsp;</span><span style="color: #9876AA">strrev</span><span style="color: #007700">(</span><span style="color: #9876AA">$job</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">workload</span><span style="color: #007700">());<br />}<br /><br /></span><span style="color: #9876AA">?&gt;</span> </span> </span></div>     </div>      <div class="example-contents"><p>      Running the worker with no submitted jobs will generate output that looks like the following:     </p></div>     <div class="example-contents screen" style="background:black;padding-left:5px;"> <div class="cdata"><span> Starting Waiting for job... Timeout. Waiting for next job... Timeout. Waiting for next job... Timeout. Waiting for next job... </span></div>     </div>    </div>   </span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 seealso" id="refsect1-gearmanworker.settimeout-seealso">   <h3 class="title">参见</h3>   <span>    <ul class="simplelist">     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanWorker::timeout()} - Get socket I/O activity timeout</span></li>    </ul>   </span>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.gearmanworker.php">GearmanWorker</a></div></div>
     * @return bool Always returns true*/
    public function setTimeout($timeout) {}

/**
*<div id="gearmanworker.setid" class="refentry">  <div class="refnamediv">   <h1 class="refname">GearmanWorker::setId</h1>   <p class="verinfo">(No version information available, might only be in Git)</p><p class="refpurpose"><span class="refname">GearmanWorker::setId</span> &mdash; <span class="dc-title">Give the worker an identifier so it can be tracked when asking gearmand for the list of available workers</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-gearmanworker.setid-description">   <h3 class="title">说明</h3>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">bool</span> <span class="methodname" style="color:#CC7832"><strong>GearmanWorker::setId</strong></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$id</span></span>    )</div>    <p class="para rdfs-comment">    Assigns the worker an identifier.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-gearmanworker.setid-parameters">   <h3 class="title">参数</h3>   <dl>          <dt> <span class="parameter" style="color:#2EACF9">id</span></dt>      <dd>       <span>       A string identifier.      </span>     </dd>        </dl>   </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-gearmanworker.setid-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    成功时返回 <strong><span>TRUE</span></strong>， 或者在失败时返回 <strong><span>FALSE</span></strong>。   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 examples" id="refsect1-gearmanworker.setid-examples">   <h3 class="title">范例</h3>   <div class="example" id="example-5354">    <p><strong>Example #1 <span class="function"><strong style="color:#CC7832">GearmanWorker::setId()</strong></span> example</strong></p>    <div class="example-contents"><p>      Set an identifier for a simple worker.    </p></div>    <div class="example-contents"> <div class="phpcode" style="border-color:gray;background:#232525"><span><span style="color: #000000"> <span style="color: #9876AA">&lt;?php<br />$worker</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #9876AA">GearmanWorker</span><span style="color: #007700">();<br /></span><span style="color: #9876AA">$worker</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">setId</span><span style="color: #007700">(</span><span style="color: #DD0000">'test'</span><span style="color: #007700">);<br /></span><span style="color: #9876AA">?&gt;</span> </span> </span></div>    </div>     <div class="example-contents"><p>以上例程的输出类似于：</p></div>    <div class="example-contents screen" style="background:black;padding-left:5px;"> <div class="cdata"><span> Run the following command: gearadmin --workers  Output: 30 ::3a3a:3361:3361:3a33%976303667 - : test </span></div>    </div>   </div>  </div>    <div class="up"><a href="http://php.net/manual/zh/class.gearmanworker.php">GearmanWorker</a></div></div>
     * @return bool Returns TRUE on success or FALSE on failure*/
    public function setId($id) {}

/**
*<div id="gearmanworker.addserver" class="refentry">  <div class="refnamediv">   <h1 class="refname">GearmanWorker::addServer</h1>   <p class="verinfo">(PECL gearman &gt;= 0.5.0)</p><p class="refpurpose"><span class="refname">GearmanWorker::addServer</span> &mdash; <span class="dc-title">Add a job server</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-gearmanworker.addserver-description">   <h3 class="title">说明</h3>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">bool</span> <span class="methodname" style="color:#CC7832"><strong>GearmanWorker::addServer</strong></span>     ([ <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$host</span><span class="initializer"> = 127.0.0.1</span></span>    [, <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$port</span><span class="initializer"> = 4730</span></span>   ]] )</div>    <p class="para rdfs-comment">    Adds a job server to this worker.  This goes into a list of servers than can be used to run jobs.    No socket I/O happens here.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-gearmanworker.addserver-parameters">   <h3 class="title">参数</h3>   <span>    <dl>            <dt> <span class="parameter" style="color:#2EACF9">host</span></dt>       <dd>        <p class="para">        任务服务器主机名。       </p>      </dd>                 <dt> <span class="parameter" style="color:#2EACF9">port</span></dt>       <dd>        <p class="para">        任务服务器端口号。       </p>      </dd>          </dl>    </span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-gearmanworker.addserver-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    成功时返回 <strong><span>TRUE</span></strong>， 或者在失败时返回 <strong><span>FALSE</span></strong>。   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 examples" id="refsect1-gearmanworker.addserver-examples">   <h3 class="title">范例</h3>   <span>    <div class="example" id="example-5352">     <p><strong>Example #1 Add alternate Gearman servers</strong></p>     <div class="example-contents"> <div class="phpcode" style="border-color:gray;background:#232525"><span><span style="color: #000000"> <span style="color: #9876AA">&lt;?php<br />$worker</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #9876AA">GearmanWorker</span><span style="color: #007700">();&nbsp;<br /></span><span style="color: #9876AA">$worker</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">addServer</span><span style="color: #007700">(</span><span style="color: #DD0000">"10.0.0.1"</span><span style="color: #007700">);&nbsp;<br /></span><span style="color: #9876AA">$worker</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">addServer</span><span style="color: #007700">(</span><span style="color: #DD0000">"10.0.0.2"</span><span style="color: #007700">,&nbsp;</span><span style="color: #9876AA">7003</span><span style="color: #007700">);<br /></span><span style="color: #9876AA">?&gt;</span> </span> </span></div>     </div>     </div>   </span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 seealso" id="refsect1-gearmanworker.addserver-seealso">   <h3 class="title">参见</h3>   <span>    <ul class="simplelist">     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanWorker::addServers()} - Add job servers</span></li>    </ul>   </span>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.gearmanworker.php">GearmanWorker</a></div></div>
     * @return bool*/
    public function addServer($host = '127.0.0.1', $port = 4730) {}

/**
*<div id="gearmanworker.addservers" class="refentry">  <div class="refnamediv">   <h1 class="refname">GearmanWorker::addServers</h1>   <p class="verinfo">(PECL gearman &gt;= 0.5.0)</p><p class="refpurpose"><span class="refname">GearmanWorker::addServers</span> &mdash; <span class="dc-title">Add job servers</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-gearmanworker.addservers-description">   <h3 class="title">说明</h3>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">bool</span> <span class="methodname" style="color:#CC7832"><strong>GearmanWorker::addServers</strong></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$servers</span><span class="initializer"> = 127.0.0.1:4730</span></span>    )</div>    <p class="para rdfs-comment">    Adds one or more job servers to this worker.  These go into a list of servers that can be used    to run jobs.  No socket I/O happens here.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-gearmanworker.addservers-parameters">   <h3 class="title">参数</h3>   <span>    <dl>            <dt> <span class="parameter" style="color:#2EACF9">servers</span></dt>       <dd>        <p class="para">        A comma separated list of job servers in the format host:port. If no port is       specified, it defaults to 4730.       </p>      </dd>          </dl>    </span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-gearmanworker.addservers-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    成功时返回 <strong><span>TRUE</span></strong>， 或者在失败时返回 <strong><span>FALSE</span></strong>。   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 examples" id="refsect1-gearmanworker.addservers-examples">   <h3 class="title">范例</h3>   <span>    <div class="example" id="example-5353">     <p><strong>Example #1 Add two job servers</strong></p>     <div class="example-contents"> <div class="phpcode" style="border-color:gray;background:#232525"><span><span style="color: #000000"> <span style="color: #9876AA">&lt;?php<br /><br />$worker</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #9876AA">GearmanWorker</span><span style="color: #007700">();&nbsp;<br /></span><span style="color: #9876AA">$worker</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">addServers</span><span style="color: #007700">(</span><span style="color: #DD0000">"10.0.0.1,10.0.0.2:7003"</span><span style="color: #007700">);<br /><br /></span><span style="color: #9876AA">?&gt;</span> </span> </span></div>     </div>     </div>   </span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 seealso" id="refsect1-gearmanworker.addservers-seealso">   <h3 class="title">参见</h3>   <span>    <ul class="simplelist">     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanWorker::addServer()} - Add a job server</span></li>    </ul>   </span>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.gearmanworker.php">GearmanWorker</a></div></div>
     * @return bool*/
    public function addServers($servers = '127.0.0.1:4730') {}

/**
*<div id="gearmanworker.wait" class="refentry">  <div class="refnamediv">   <h1 class="refname">GearmanWorker::wait</h1>   <p class="verinfo">(PECL gearman &gt;= 0.6.0)</p><p class="refpurpose"><span class="refname">GearmanWorker::wait</span> &mdash; <span class="dc-title">Wait for activity from one of the job servers</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-gearmanworker.wait-description">   <h3 class="title">说明</h3>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">bool</span> <span class="methodname" style="color:#CC7832"><strong>GearmanWorker::wait</strong></span>     ( <span class="methodparam">void</span>    )</div>    <p class="para rdfs-comment">    Causes the worker to wait for activity from one of the Gearman job servers when operating    in non-blocking I/O mode.  On failure, issues a <strong><span>E_WARNING</span></strong> with the last Gearman error    encountered.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-gearmanworker.wait-parameters">   <h3 class="title">参数</h3>   <span>此函数没有参数。</span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-gearmanworker.wait-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    成功时返回 <strong><span>TRUE</span></strong>， 或者在失败时返回 <strong><span>FALSE</span></strong>。   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 examples" id="refsect1-gearmanworker.wait-examples">   <h3 class="title">范例</h3>   <span>    <div class="example" id="example-5356">     <p><strong>Example #1 Running worker in non-blocking mode</strong></p>     <div class="example-contents"> <div class="phpcode" style="border-color:gray;background:#232525"><span><span style="color: #000000"> <span style="color: #9876AA">&lt;?php<br /><br /></span><span style="color: #007700">echo&nbsp;</span><span style="color: #DD0000">"Starting\n"</span><span style="color: #007700">;<br /><br /></span><span style="color: #FF8000">#&nbsp;Create&nbsp;our&nbsp;worker&nbsp;object<br /></span><span style="color: #9876AA">$worker</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #9876AA">GearmanWorker</span><span style="color: #007700">();<br /><br /></span><span style="color: #FF8000">#&nbsp;Make&nbsp;the&nbsp;worker&nbsp;non-blocking<br /></span><span style="color: #9876AA">$worker</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">addOptions</span><span style="color: #007700">(</span><span style="color: #9876AA">GEARMAN_WORKER_NON_BLOCKING</span><span style="color: #007700">);&nbsp;<br /><br /></span><span style="color: #FF8000">#&nbsp;Add&nbsp;the&nbsp;default&nbsp;server&nbsp;(localhost,&nbsp;port&nbsp;4730)<br /></span><span style="color: #9876AA">$worker</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">addServer</span><span style="color: #007700">();&nbsp;<br /><br /></span><span style="color: #FF8000">#&nbsp;Add&nbsp;our&nbsp;reverse&nbsp;function<br /></span><span style="color: #9876AA">$worker</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">addFunction</span><span style="color: #007700">(</span><span style="color: #DD0000">'reverse'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'reverse_fn'</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">#&nbsp;Try&nbsp;to&nbsp;grab&nbsp;a&nbsp;job<br /></span><span style="color: #007700">while&nbsp;(@</span><span style="color: #9876AA">$worker</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">work</span><span style="color: #007700">()&nbsp;||<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #9876AA">$worker</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">returnCode</span><span style="color: #007700">()&nbsp;==&nbsp;</span><span style="color: #9876AA">GEARMAN_IO_WAIT&nbsp;</span><span style="color: #007700">||<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #9876AA">$worker</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">returnCode</span><span style="color: #007700">()&nbsp;==&nbsp;</span><span style="color: #9876AA">GEARMAN_NO_JOBS</span><span style="color: #007700">)<br />{<br />&nbsp;&nbsp;if&nbsp;(</span><span style="color: #9876AA">$worker</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">returnCode</span><span style="color: #007700">()&nbsp;==&nbsp;</span><span style="color: #9876AA">GEARMAN_SUCCESS</span><span style="color: #007700">)<br />&nbsp;&nbsp;&nbsp;&nbsp;continue;<br /><br />&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"Waiting&nbsp;for&nbsp;next&nbsp;job...\n"</span><span style="color: #007700">;<br />&nbsp;&nbsp;if&nbsp;(!@</span><span style="color: #9876AA">$worker</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">wait</span><span style="color: #007700">())&nbsp;<br />&nbsp;&nbsp;{&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(</span><span style="color: #9876AA">$worker</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">returnCode</span><span style="color: #007700">()&nbsp;==&nbsp;</span><span style="color: #9876AA">GEARMAN_NO_ACTIVE_FDS</span><span style="color: #007700">)&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">#&nbsp;We&nbsp;are&nbsp;not&nbsp;connected&nbsp;to&nbsp;any&nbsp;servers,&nbsp;so&nbsp;wait&nbsp;a&nbsp;bit&nbsp;before&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;trying&nbsp;to&nbsp;reconnect.&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #9876AA">sleep</span><span style="color: #007700">(</span><span style="color: #9876AA">5</span><span style="color: #007700">);&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;continue;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;break;&nbsp;<br />&nbsp;&nbsp;}&nbsp;<br />}&nbsp;<br /><br />echo&nbsp;</span><span style="color: #DD0000">"Worker&nbsp;Error:&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #9876AA">$worker</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">error</span><span style="color: #007700">()&nbsp;.&nbsp;</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br /><br />function&nbsp;</span><span style="color: #9876AA">reverse_fn</span><span style="color: #007700">(</span><span style="color: #9876AA">$job</span><span style="color: #007700">)<br />{<br />&nbsp;&nbsp;return&nbsp;</span><span style="color: #9876AA">strrev</span><span style="color: #007700">(</span><span style="color: #9876AA">$job</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">workload</span><span style="color: #007700">());<br />}<br /><br /><br /></span><span style="color: #9876AA">?&gt;</span> </span> </span></div>     </div>     </div>   </span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 seealso" id="refsect1-gearmanworker.wait-seealso">   <h3 class="title">参见</h3>   <span>    <ul class="simplelist">     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanWorker::work()} - Wait for and perform jobs</span></li>    </ul>   </span>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.gearmanworker.php">GearmanWorker</a></div></div>
     * @return bool*/
    public function wait() {}

/**
*<div id="gearmanworker.register" class="refentry">  <div class="refnamediv">   <h1 class="refname">GearmanWorker::register</h1>   <p class="verinfo">(PECL gearman &gt;= 0.6.0)</p><p class="refpurpose"><span class="refname">GearmanWorker::register</span> &mdash; <span class="dc-title">Register a function with the job server</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-gearmanworker.register-description">   <h3 class="title">说明</h3>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">bool</span> <span class="methodname" style="color:#CC7832"><strong>GearmanWorker::register</strong></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$function_name</span></span>    [, <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$timeout</span></span>   ] )</div>    <p class="para rdfs-comment">    Registers a function name with the job server with an optional timeout.  The timeout    specifies how many seconds the server will wait before marking a job as failed.    If the timeout is set to zero, there is no timeout.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-gearmanworker.register-parameters">   <h3 class="title">参数</h3>   <span>    <dl>            <dt> <span class="parameter" style="color:#2EACF9">function_name</span></dt>       <dd>        <p class="para">        The name of a function to register with the job server       </p>      </dd>                 <dt> <span class="parameter" style="color:#2EACF9">timeout</span></dt>       <dd>        <p class="para">        An interval of time in seconds       </p>      </dd>          </dl>    </span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-gearmanworker.register-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    A standard Gearman return value.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 seealso" id="refsect1-gearmanworker.register-seealso">   <h3 class="title">参见</h3>   <span>    <ul class="simplelist">     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanWorker::unregister()} - Unregister a function name with the job servers</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanWorker::unregisterAll()} - Unregister all function names with the job servers</span></li>    </ul>   </span>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.gearmanworker.php">GearmanWorker</a></div></div>
     * @return bool A standard Gearman return value*/
    public function register($function_name, $timeout) {}

/**
*<div id="gearmanworker.unregister" class="refentry">  <div class="refnamediv">   <h1 class="refname">GearmanWorker::unregister</h1>   <p class="verinfo">(PECL gearman &gt;= 0.6.0)</p><p class="refpurpose"><span class="refname">GearmanWorker::unregister</span> &mdash; <span class="dc-title">Unregister a function name with the job servers</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-gearmanworker.unregister-description">   <h3 class="title">说明</h3>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">bool</span> <span class="methodname" style="color:#CC7832"><strong>GearmanWorker::unregister</strong></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$function_name</span></span>    )</div>    <p class="para rdfs-comment">    Unregisters a function name with the job servers ensuring that no more jobs (for that    function) are sent to this worker.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-gearmanworker.unregister-parameters">   <h3 class="title">参数</h3>   <span>    <dl>            <dt> <span class="parameter" style="color:#2EACF9">function_name</span></dt>       <dd>        <p class="para">        The name of a function to register with the job server       </p>      </dd>          </dl>    </span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-gearmanworker.unregister-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    A standard Gearman return value.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 seealso" id="refsect1-gearmanworker.unregister-seealso">   <h3 class="title">参见</h3>   <span>    <ul class="simplelist">     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanWorker::register()} - Register a function with the job server</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanWorker::unregisterAll()} - Unregister all function names with the job servers</span></li>    </ul>   </span>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.gearmanworker.php">GearmanWorker</a></div></div>
     * @return bool A standard Gearman return value*/
    public function unregister($function_name) {}

/**
*<div id="gearmanworker.unregisterall" class="refentry">  <div class="refnamediv">   <h1 class="refname">GearmanWorker::unregisterAll</h1>   <p class="verinfo">(PECL gearman &gt;= 0.6.0)</p><p class="refpurpose"><span class="refname">GearmanWorker::unregisterAll</span> &mdash; <span class="dc-title">Unregister all function names with the job servers</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-gearmanworker.unregisterall-description">   <h3 class="title">说明</h3>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">bool</span> <span class="methodname" style="color:#CC7832"><strong>GearmanWorker::unregisterAll</strong></span>     ( <span class="methodparam">void</span>    )</div>    <p class="para rdfs-comment">    Unregisters all previously registered functions, ensuring that no more jobs are    sent to this worker.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-gearmanworker.unregisterall-parameters">   <h3 class="title">参数</h3>   <span>此函数没有参数。</span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-gearmanworker.unregisterall-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    A standard Gearman return value.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 seealso" id="refsect1-gearmanworker.unregisterall-seealso">   <h3 class="title">参见</h3>   <span>    <ul class="simplelist">     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanWorker::register()} - Register a function with the job server</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanWorker::unregister()} - Unregister a function name with the job servers</span></li>    </ul>   </span>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.gearmanworker.php">GearmanWorker</a></div></div>
     * @return bool A standard Gearman return value*/
    public function unregisterAll() {}

    /**
       */
    public function grabJob() {}

/**
*<div id="gearmanworker.addfunction" class="refentry">  <div class="refnamediv">   <h1 class="refname">GearmanWorker::addFunction</h1>   <p class="verinfo">(PECL gearman &gt;= 0.5.0)</p><p class="refpurpose"><span class="refname">GearmanWorker::addFunction</span> &mdash; <span class="dc-title">Register and add callback function</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-gearmanworker.addfunction-description">   <h3 class="title">说明</h3>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">bool</span> <span class="methodname" style="color:#CC7832"><strong>GearmanWorker::addFunction</strong></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$function_name</span></span>    , <span class="methodparam"><span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/language.types.callable.php" class="type callable" style="color:#EAB766">callable</a></span> <span class="parameter" style="color:#2EACF9">$function</span></span>    [, <span class="methodparam"><span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/language.pseudo-types.php#language.types.mixed" class="type mixed" style="color:#EAB766">mixed</a></span> <span class="parameter" style="color:#2EACF9">&$context</span></span>    [, <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$timeout</span></span>   ]] )</div>    <p class="para rdfs-comment">    Registers a function name with the job server and specifies a callback corresponding to that    function.  Optionally specify extra application context data to be used when the callback is    called and a timeout.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-gearmanworker.addfunction-parameters">   <h3 class="title">参数</h3>   <span>    <dl>            <dt> <span class="parameter" style="color:#2EACF9">function_name</span></dt>       <dd>        <p class="para">        The name of a function to register with the job server       </p>      </dd>                 <dt> <span class="parameter" style="color:#2EACF9">function</span></dt>       <dd>        <p class="para">        A callback that gets called when a job for the registered function name is submitted       </p>      </dd>                 <dt> <span class="parameter" style="color:#2EACF9">context</span></dt>       <dd>        <p class="para">        A reference to arbitrary application context data that can be modified by the worker function       </p>      </dd>                 <dt> <span class="parameter" style="color:#2EACF9">timeout</span></dt>       <dd>        <p class="para">        An interval of time in seconds       </p>      </dd>          </dl>    </span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-gearmanworker.addfunction-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    成功时返回 <strong><span>TRUE</span></strong>， 或者在失败时返回 <strong><span>FALSE</span></strong>。   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 examples" id="refsect1-gearmanworker.addfunction-examples">   <h3 class="title">范例</h3>   <span>    <div class="example" id="example-5351">     <p><strong>Example #1 Simple worker making use of extra application context data</strong></p>     <div class="example-contents"> <div class="phpcode" style="border-color:gray;background:#232525"><span><span style="color: #000000"> <span style="color: #9876AA">&lt;?php<br /><br /></span><span style="color: #FF8000">#&nbsp;get&nbsp;a&nbsp;gearman&nbsp;worker<br /></span><span style="color: #9876AA">$worker</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #9876AA">GearmanWorker</span><span style="color: #007700">();&nbsp;<br /><br /></span><span style="color: #FF8000">#&nbsp;add&nbsp;the&nbsp;default&nbsp;server&nbsp;(localhost)<br /></span><span style="color: #9876AA">$worker</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">addServer</span><span style="color: #007700">();&nbsp;<br /><br /></span><span style="color: #FF8000">#&nbsp;define&nbsp;a&nbsp;variable&nbsp;to&nbsp;hold&nbsp;application&nbsp;data<br /></span><span style="color: #9876AA">$count</span><span style="color: #007700">=&nbsp;</span><span style="color: #9876AA">0</span><span style="color: #007700">;&nbsp;<br /><br /></span><span style="color: #FF8000">#&nbsp;add&nbsp;the&nbsp;"reverse"&nbsp;function<br /></span><span style="color: #9876AA">$worker</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">addFunction</span><span style="color: #007700">(</span><span style="color: #DD0000">"reverse"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"reverse_cb"</span><span style="color: #007700">,&nbsp;</span><span style="color: #9876AA">$count</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">#&nbsp;start&nbsp;the&nbsp;worker<br /></span><span style="color: #007700">while&nbsp;(</span><span style="color: #9876AA">$worker</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">work</span><span style="color: #007700">());<br /><br />function&nbsp;</span><span style="color: #9876AA">reverse_cb</span><span style="color: #007700">(</span><span style="color: #9876AA">$job</span><span style="color: #007700">,&nbsp;&amp;</span><span style="color: #9876AA">$count</span><span style="color: #007700">)&nbsp;<br />{&nbsp;<br />&nbsp;&nbsp;</span><span style="color: #9876AA">$count</span><span style="color: #007700">++;&nbsp;<br />&nbsp;&nbsp;return&nbsp;</span><span style="color: #DD0000">"</span><span style="color: #9876AA">$count</span><span style="color: #DD0000">:&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #9876AA">strrev</span><span style="color: #007700">(</span><span style="color: #9876AA">$job</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">workload</span><span style="color: #007700">());&nbsp;<br />}&nbsp;<br /><br /></span><span style="color: #9876AA">?&gt;</span> </span> </span></div>     </div>      <div class="example-contents"><p>      Running a client that submits two jobs for the reverse function would have      output similar to the following:     </p></div>     <div class="example-contents screen" style="background:black;padding-left:5px;"> <div class="cdata"><span> 1: olleh 2: dlrow </span></div>     </div>    </div>   </span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 seealso" id="refsect1-gearmanworker.addfunction-seealso">   <h3 class="title">参见</h3>   <span>    <ul class="simplelist">     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::do()} - Run a single task and return a result [deprecated]</span></li>    </ul>   </span>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.gearmanworker.php">GearmanWorker</a></div></div>
     * @return bool*/
    public function addFunction($function_name, $function, $context = null, $timeout = 0) {}

/**
*<div id="gearmanworker.work" class="refentry">  <div class="refnamediv">   <h1 class="refname">GearmanWorker::work</h1>   <p class="verinfo">(PECL gearman &gt;= 0.5.0)</p><p class="refpurpose"><span class="refname">GearmanWorker::work</span> &mdash; <span class="dc-title">Wait for and perform jobs</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-gearmanworker.work-description">   <h3 class="title">说明</h3>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">bool</span> <span class="methodname" style="color:#CC7832"><strong>GearmanWorker::work</strong></span>     ( <span class="methodparam">void</span>    )</div>    <p class="para rdfs-comment">    Waits for a job to be assigned and then calls the appropriate callback function.    Issues an <strong><span>E_WARNING</span></strong> with the last Gearman error if the return    code is not one of <strong><span>GEARMAN_SUCCESS</span></strong>, <strong><span>GEARMAN_IO_WAIT</span></strong>,    or <strong><span>GEARMAN_WORK_FAIL</span></strong>.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-gearmanworker.work-parameters">   <h3 class="title">参数</h3>   <span>此函数没有参数。</span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-gearmanworker.work-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    成功时返回 <strong><span>TRUE</span></strong>， 或者在失败时返回 <strong><span>FALSE</span></strong>。   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 examples" id="refsect1-gearmanworker.work-examples">   <h3 class="title">范例</h3>   <span>    <div class="example" id="example-5357">     <p><strong>Example #1 <span class="methodname" style="color:#CC7832"><strong>GearmanWorker::work()</strong></span> example</strong></p>     <div class="example-contents"> <div class="phpcode" style="border-color:gray;background:#232525"><span><span style="color: #000000"> <span style="color: #9876AA">&lt;?php<br /><br /></span><span style="color: #FF8000">#&nbsp;create&nbsp;the&nbsp;worker<br /></span><span style="color: #9876AA">$worker&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #9876AA">GearmanWorker</span><span style="color: #007700">();&nbsp;<br /><br /></span><span style="color: #FF8000">#&nbsp;add&nbsp;the&nbsp;default&nbsp;job&nbsp;server&nbsp;(localhost)<br /></span><span style="color: #9876AA">$worker</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">addServer</span><span style="color: #007700">();&nbsp;<br /><br /></span><span style="color: #FF8000">#&nbsp;add&nbsp;the&nbsp;reverse&nbsp;function<br /></span><span style="color: #9876AA">$worker</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">addFunction</span><span style="color: #007700">(</span><span style="color: #DD0000">"reverse"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"my_reverse_function"</span><span style="color: #007700">);&nbsp;<br /><br /></span><span style="color: #FF8000">#&nbsp;start&nbsp;te&nbsp;worker&nbsp;listening&nbsp;for&nbsp;job&nbsp;submissions<br /></span><span style="color: #007700">while&nbsp;(</span><span style="color: #9876AA">$worker</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">work</span><span style="color: #007700">());&nbsp;<br />&nbsp;<br />function&nbsp;</span><span style="color: #9876AA">my_reverse_function</span><span style="color: #007700">(</span><span style="color: #9876AA">$job</span><span style="color: #007700">)&nbsp;<br />{&nbsp;<br />&nbsp;&nbsp;return&nbsp;</span><span style="color: #9876AA">strrev</span><span style="color: #007700">(</span><span style="color: #9876AA">$job</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">workload</span><span style="color: #007700">());&nbsp;<br />}<br /><br /></span><span style="color: #9876AA">?&gt;</span> </span> </span></div>     </div>     </div>   </span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 seealso" id="refsect1-gearmanworker.work-seealso">   <h3 class="title">参见</h3>   <span>    <ul class="simplelist">     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanWorker::addFunction()} - Register and add callback function</span></li>    </ul>   </span>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.gearmanworker.php">GearmanWorker</a></div></div>
     * @return bool*/
    public function work() {}

}


/**
*<div id="class.gearmanjob" class="reference">   <h1 class="title">The GearmanJob class</h1>     <div class="partintro"><p class="verinfo">(PECL gearman &gt;= 0.5.0)</p>     <div class="section" id="gearmanjob.intro">    <h2 class="title">简介</h2>    <p class="para">         </p>   </div>     <div class="section" id="gearmanjob.synopsis">    <h2 class="title">类摘要</h2>      <div class="classsynopsis">     <div class="ooclass"></div>       <div class="classsynopsisinfo">      <span class="ooclass">       <strong class="classname">GearmanJob</strong>      </span>      {</div>           <div class="classsynopsisinfo classsynopsisinfo_comment">// 方法 </div>     <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">bool</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmanjob.complete.php" class="methodname" style="color:#CC7832">complete</a></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$result</span></span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmanjob.construct.php" class="methodname" style="color:#CC7832">__construct</a></span>     ( <span class="methodparam">void</span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">bool</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmanjob.data.php" class="methodname" style="color:#CC7832">data</a></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$data</span></span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">bool</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmanjob.exception.php" class="methodname" style="color:#CC7832">exception</a></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$exception</span></span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">bool</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmanjob.fail.php" class="methodname" style="color:#CC7832">fail</a></span>     ( <span class="methodparam">void</span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">string</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmanjob.functionname.php" class="methodname" style="color:#CC7832">functionName</a></span>     ( <span class="methodparam">void</span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">string</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmanjob.handle.php" class="methodname" style="color:#CC7832">handle</a></span>     ( <span class="methodparam">void</span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">int</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmanjob.returncode.php" class="methodname" style="color:#CC7832">returnCode</a></span>     ( <span class="methodparam">void</span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">bool</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmanjob.sendcomplete.php" class="methodname" style="color:#CC7832">sendComplete</a></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$result</span></span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">bool</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmanjob.senddata.php" class="methodname" style="color:#CC7832">sendData</a></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$data</span></span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">bool</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmanjob.sendexception.php" class="methodname" style="color:#CC7832">sendException</a></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$exception</span></span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">bool</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmanjob.sendfail.php" class="methodname" style="color:#CC7832">sendFail</a></span>     ( <span class="methodparam">void</span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">bool</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmanjob.sendstatus.php" class="methodname" style="color:#CC7832">sendStatus</a></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$numerator</span></span>    , <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$denominator</span></span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">bool</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmanjob.sendwarning.php" class="methodname" style="color:#CC7832">sendWarning</a></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$warning</span></span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">bool</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmanjob.setreturn.php" class="methodname" style="color:#CC7832">setReturn</a></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$gearman_return_t</span></span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">bool</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmanjob.status.php" class="methodname" style="color:#CC7832">status</a></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$numerator</span></span>    , <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$denominator</span></span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">string</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmanjob.unique.php" class="methodname" style="color:#CC7832">unique</a></span>     ( <span class="methodparam">void</span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">bool</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmanjob.warning.php" class="methodname" style="color:#CC7832">warning</a></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$warning</span></span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">string</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmanjob.workload.php" class="methodname" style="color:#CC7832">workload</a></span>     ( <span class="methodparam">void</span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">int</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/gearmanjob.workloadsize.php" class="methodname" style="color:#CC7832">workloadSize</a></span>     ( <span class="methodparam">void</span>    )</div>     }</div>     </div>   </div>                                                                                                                                                 <h2>Table of Contents</h2><ul class="chunklist chunklist_reference"><li>{@link GearmanJob::complete} — Send the result and complete status (deprecated)</li><li>{@link GearmanJob::__construct} — Create a GearmanJob instance</li><li>{@link GearmanJob::data} — Send data for a running job (deprecated)</li><li>{@link GearmanJob::exception} — Send exception for running job (deprecated)</li><li>{@link GearmanJob::fail} — Send fail status (deprecated)</li><li>{@link GearmanJob::functionName} — Get function name</li><li>{@link GearmanJob::handle} — Get the job handle</li><li>{@link GearmanJob::returnCode} — Get last return code</li><li>{@link GearmanJob::sendComplete} — Send the result and complete status</li><li>{@link GearmanJob::sendData} — Send data for a running job</li><li>{@link GearmanJob::sendException} — Send exception for running job (exception)</li><li>{@link GearmanJob::sendFail} — Send fail status</li><li>{@link GearmanJob::sendStatus} — Send status</li><li>{@link GearmanJob::sendWarning} — Send a warning</li><li>{@link GearmanJob::setReturn} — Set a return value</li><li>{@link GearmanJob::status} — Send status (deprecated)</li><li>{@link GearmanJob::unique} — Get the unique identifier</li><li>{@link GearmanJob::warning} — Send a warning (deprecated)</li><li>{@link GearmanJob::workload} — Get workload</li><li>{@link GearmanJob::workloadSize} — Get size of work load</li></ul> <div class="up"><a href="http://php.net/manual/zh/book.gearman.php">Gearman</a></div></div>
*/
class GearmanJob {
/**
*<div id="gearmanjob.returncode" class="refentry">  <div class="refnamediv">   <h1 class="refname">GearmanJob::returnCode</h1>   <p class="verinfo">(PECL gearman &gt;= 0.5.0)</p><p class="refpurpose"><span class="refname">GearmanJob::returnCode</span> &mdash; <span class="dc-title">Get last return code</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-gearmanjob.returncode-description">   <h3 class="title">说明</h3>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">int</span> <span class="methodname" style="color:#CC7832"><strong>GearmanJob::returnCode</strong></span>     ( <span class="methodparam">void</span>    )</div>    <p class="para rdfs-comment">    Returns the last return code issued by the job server.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-gearmanjob.returncode-parameters">   <h3 class="title">参数</h3>   <span>此函数没有参数。</span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-gearmanjob.returncode-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    A valid Gearman return code.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 seealso" id="refsect1-gearmanjob.returncode-seealso">   <h3 class="title">参见</h3>   <span>    <ul class="simplelist">     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanTask::returnCode()} - Get the last return code</span></li>    </ul>   </span>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.gearmanjob.php">GearmanJob</a></div></div>
     * @return int A valid Gearman return code*/
    public function returnCode() {}

/**
*<div id="gearmanjob.setreturn" class="refentry">  <div class="refnamediv">   <h1 class="refname">GearmanJob::setReturn</h1>   <p class="verinfo">(PECL gearman &gt;= 0.5.0)</p><p class="refpurpose"><span class="refname">GearmanJob::setReturn</span> &mdash; <span class="dc-title">Set a return value</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-gearmanjob.setreturn-description">   <h3 class="title">说明</h3>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">bool</span> <span class="methodname" style="color:#CC7832"><strong>GearmanJob::setReturn</strong></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$gearman_return_t</span></span>    )</div>    <p class="para rdfs-comment">    Sets the return value for this job, indicates how the job completed.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-gearmanjob.setreturn-parameters">   <h3 class="title">参数</h3>   <span>    <dl>            <dt> <span class="parameter" style="color:#2EACF9">gearman_return_t</span></dt>       <dd>        <p class="para">        A valid Gearman return value.       </p>      </dd>          </dl>    </span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-gearmanjob.setreturn-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    Description...   </p>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.gearmanjob.php">GearmanJob</a></div></div>
     * @return bool Description*/
    public function setReturn($gearman_return_t) {}

/**
*<div id="gearmanjob.senddata" class="refentry">  <div class="refnamediv">   <h1 class="refname">GearmanJob::sendData</h1>   <p class="verinfo">(PECL gearman &gt;= 0.6.0)</p><p class="refpurpose"><span class="refname">GearmanJob::sendData</span> &mdash; <span class="dc-title">Send data for a running job</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-gearmanjob.senddata-description">   <h3 class="title">说明</h3>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">bool</span> <span class="methodname" style="color:#CC7832"><strong>GearmanJob::sendData</strong></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$data</span></span>    )</div>    <p class="para rdfs-comment">    Sends data to the job server (and any listening clients) for this job.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-gearmanjob.senddata-parameters">   <h3 class="title">参数</h3>   <span>    <dl>            <dt> <span class="parameter" style="color:#2EACF9">data</span></dt>       <dd>        <p class="para">        Arbitrary serialized data.       </p>      </dd>          </dl>    </span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-gearmanjob.senddata-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    成功时返回 <strong><span>TRUE</span></strong>， 或者在失败时返回 <strong><span>FALSE</span></strong>。   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 seealso" id="refsect1-gearmanjob.senddata-seealso">   <h3 class="title">参见</h3>   <span>    <ul class="simplelist">     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanJob::workload()} - Get workload</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanTask::data()} - Get data returned for a task</span></li>    </ul>   </span>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.gearmanjob.php">GearmanJob</a></div></div>
     * @return bool*/
    public function sendData($data) {}

/**
*<div id="gearmanjob.sendwarning" class="refentry">  <div class="refnamediv">   <h1 class="refname">GearmanJob::sendWarning</h1>   <p class="verinfo">(PECL gearman &gt;= 0.6.0)</p><p class="refpurpose"><span class="refname">GearmanJob::sendWarning</span> &mdash; <span class="dc-title">Send a warning</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-gearmanjob.sendwarning-description">   <h3 class="title">说明</h3>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">bool</span> <span class="methodname" style="color:#CC7832"><strong>GearmanJob::sendWarning</strong></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$warning</span></span>    )</div>    <p class="para rdfs-comment">    Sends a warning for this job while it is running.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-gearmanjob.sendwarning-parameters">   <h3 class="title">参数</h3>   <span>    <dl>            <dt> <span class="parameter" style="color:#2EACF9">warning</span></dt>       <dd>        <p class="para">        A warning message.       </p>      </dd>          </dl>    </span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-gearmanjob.sendwarning-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    成功时返回 <strong><span>TRUE</span></strong>， 或者在失败时返回 <strong><span>FALSE</span></strong>。   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 seealso" id="refsect1-gearmanjob.sendwarning-seealso">   <h3 class="title">参见</h3>   <span>    <ul class="simplelist">     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanJob::sendComplete()} - Send the result and complete status</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanJob::sendException()} - Send exception for running job (exception)</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanJob::sendFail()} - Send fail status</span></li>    </ul>   </span>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.gearmanjob.php">GearmanJob</a></div></div>
     * @return bool*/
    public function sendWarning($warning) {}

/**
*<div id="gearmanjob.sendstatus" class="refentry">  <div class="refnamediv">   <h1 class="refname">GearmanJob::sendStatus</h1>   <p class="verinfo">(PECL gearman &gt;= 0.6.0)</p><p class="refpurpose"><span class="refname">GearmanJob::sendStatus</span> &mdash; <span class="dc-title">Send status</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-gearmanjob.sendstatus-description">   <h3 class="title">说明</h3>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">bool</span> <span class="methodname" style="color:#CC7832"><strong>GearmanJob::sendStatus</strong></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$numerator</span></span>    , <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$denominator</span></span>    )</div>    <p class="para rdfs-comment">    Sends status information to the job server and any listening clients.  Use this    to specify what percentage of the job has been completed.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-gearmanjob.sendstatus-parameters">   <h3 class="title">参数</h3>   <span>    <dl>            <dt> <span class="parameter" style="color:#2EACF9">numerator</span></dt>       <dd>        <p class="para">        The numerator of the precentage completed expressed as a fraction.       </p>      </dd>                 <dt> <span class="parameter" style="color:#2EACF9">denominator</span></dt>       <dd>        <p class="para">        The denominator of the precentage completed expressed as a fraction.       </p>      </dd>          </dl>    </span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-gearmanjob.sendstatus-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    成功时返回 <strong><span>TRUE</span></strong>， 或者在失败时返回 <strong><span>FALSE</span></strong>。   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 seealso" id="refsect1-gearmanjob.sendstatus-seealso">   <h3 class="title">参见</h3>   <span>    <ul class="simplelist">     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::jobStatus()} - Get the status of a background job</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanTask::taskDenominator()} - Get completion percentage denominator</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanTask::taskNumerator()} - Get completion percentage numerator</span></li>    </ul>   </span>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.gearmanjob.php">GearmanJob</a></div></div>
     * @return bool*/
    public function sendStatus($numerator, $denominator) {}

/**
*<div id="gearmanjob.sendcomplete" class="refentry">  <div class="refnamediv">   <h1 class="refname">GearmanJob::sendComplete</h1>   <p class="verinfo">(PECL gearman &gt;= 0.6.0)</p><p class="refpurpose"><span class="refname">GearmanJob::sendComplete</span> &mdash; <span class="dc-title">Send the result and complete status</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-gearmanjob.sendcomplete-description">   <h3 class="title">说明</h3>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">bool</span> <span class="methodname" style="color:#CC7832"><strong>GearmanJob::sendComplete</strong></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$result</span></span>    )</div>    <p class="para rdfs-comment">    Sends result data and the complete status update for this job.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-gearmanjob.sendcomplete-parameters">   <h3 class="title">参数</h3>   <span>    <dl>            <dt> <span class="parameter" style="color:#2EACF9">result</span></dt>       <dd>        <p class="para">        Serialized result data.       </p>      </dd>          </dl>    </span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-gearmanjob.sendcomplete-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    成功时返回 <strong><span>TRUE</span></strong>， 或者在失败时返回 <strong><span>FALSE</span></strong>。   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 seealso" id="refsect1-gearmanjob.sendcomplete-seealso">   <h3 class="title">参见</h3>   <span>    <ul class="simplelist">     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanJob::sendFail()} - Send fail status</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanJob::setReturn()} - Set a return value</span></li>    </ul>   </span>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.gearmanjob.php">GearmanJob</a></div></div>
     * @return bool*/
    public function sendComplete($result) {}

/**
*<div id="gearmanjob.sendexception" class="refentry">  <div class="refnamediv">   <h1 class="refname">GearmanJob::sendException</h1>   <p class="verinfo">(PECL gearman &gt;= 0.6.0)</p><p class="refpurpose"><span class="refname">GearmanJob::sendException</span> &mdash; <span class="dc-title">Send exception for running job (exception)</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-gearmanjob.sendexception-description">   <h3 class="title">说明</h3>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">bool</span> <span class="methodname" style="color:#CC7832"><strong>GearmanJob::sendException</strong></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$exception</span></span>    )</div>    <p class="para rdfs-comment">    Sends the supplied exception when this job is running.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-gearmanjob.sendexception-parameters">   <h3 class="title">参数</h3>   <span>    <dl>            <dt> <span class="parameter" style="color:#2EACF9">exception</span></dt>       <dd>        <p class="para">        An exception description.       </p>      </dd>          </dl>    </span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-gearmanjob.sendexception-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    成功时返回 <strong><span>TRUE</span></strong>， 或者在失败时返回 <strong><span>FALSE</span></strong>。   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 seealso" id="refsect1-gearmanjob.sendexception-seealso">   <h3 class="title">参见</h3>   <span>    <ul class="simplelist">     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanJob::setReturn()} - Set a return value</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanJob::sendStatus()} - Send status</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanJob::sendWarning()} - Send a warning</span></li>    </ul>   </span>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.gearmanjob.php">GearmanJob</a></div></div>
     * @return bool*/
    public function sendException($exception) {}

/**
*<div id="gearmanjob.sendfail" class="refentry">  <div class="refnamediv">   <h1 class="refname">GearmanJob::sendFail</h1>   <p class="verinfo">(PECL gearman &gt;= 0.6.0)</p><p class="refpurpose"><span class="refname">GearmanJob::sendFail</span> &mdash; <span class="dc-title">Send fail status</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-gearmanjob.sendfail-description">   <h3 class="title">说明</h3>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">bool</span> <span class="methodname" style="color:#CC7832"><strong>GearmanJob::sendFail</strong></span>     ( <span class="methodparam">void</span>    )</div>    <p class="para rdfs-comment">    Sends failure status for this job, indicating that the job failed in a known way (as    opposed to failing due to a thrown exception).   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-gearmanjob.sendfail-parameters">   <h3 class="title">参数</h3>   <span>此函数没有参数。</span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-gearmanjob.sendfail-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    成功时返回 <strong><span>TRUE</span></strong>， 或者在失败时返回 <strong><span>FALSE</span></strong>。   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 seealso" id="refsect1-gearmanjob.sendfail-seealso">   <h3 class="title">参见</h3>   <span>    <ul class="simplelist">     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanJob::sendException()} - Send exception for running job (exception)</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanJob::setReturn()} - Set a return value</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanJob::sendStatus()} - Send status</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanJob::sendWarning()} - Send a warning</span></li>    </ul>   </span>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.gearmanjob.php">GearmanJob</a></div></div>
     * @return bool*/
    public function sendFail() {}

/**
*<div id="gearmanjob.handle" class="refentry">  <div class="refnamediv">   <h1 class="refname">GearmanJob::handle</h1>   <p class="verinfo">(PECL gearman &gt;= 0.5.0)</p><p class="refpurpose"><span class="refname">GearmanJob::handle</span> &mdash; <span class="dc-title">Get the job handle</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-gearmanjob.handle-description">   <h3 class="title">说明</h3>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">string</span> <span class="methodname" style="color:#CC7832"><strong>GearmanJob::handle</strong></span>     ( <span class="methodparam">void</span>    )</div>    <p class="para rdfs-comment">    Returns the opaque job handle assigned by the job server.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-gearmanjob.handle-parameters">   <h3 class="title">参数</h3>   <span>此函数没有参数。</span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-gearmanjob.handle-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    An opaque job handle.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 seealso" id="refsect1-gearmanjob.handle-seealso">   <h3 class="title">参见</h3>   <span>    <ul class="simplelist">     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanTask::jobHandle()} - Get the job handle</span></li>    </ul>   </span>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.gearmanjob.php">GearmanJob</a></div></div>
     * @return string An opaque job handle*/
    public function handle() {}

/**
*<div id="gearmanjob.functionname" class="refentry">  <div class="refnamediv">   <h1 class="refname">GearmanJob::functionName</h1>   <p class="verinfo">(PECL gearman &gt;= 0.5.0)</p><p class="refpurpose"><span class="refname">GearmanJob::functionName</span> &mdash; <span class="dc-title">Get function name</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-gearmanjob.functionname-description">   <h3 class="title">说明</h3>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">string</span> <span class="methodname" style="color:#CC7832"><strong>GearmanJob::functionName</strong></span>     ( <span class="methodparam">void</span>    )</div>    <p class="para rdfs-comment">    Returns the function name for this job.  This is the function the work will execute to    perform the job.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-gearmanjob.functionname-parameters">   <h3 class="title">参数</h3>   <span>此函数没有参数。</span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-gearmanjob.functionname-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    The name of a function.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 seealso" id="refsect1-gearmanjob.functionname-seealso">   <h3 class="title">参见</h3>   <span>    <ul class="simplelist">     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanTask::function()} - Get associated function name (deprecated)</span></li>    </ul>   </span>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.gearmanjob.php">GearmanJob</a></div></div>
     * @return string The name of a function*/
    public function functionName() {}

/**
*<div id="gearmanjob.unique" class="refentry">  <div class="refnamediv">   <h1 class="refname">GearmanJob::unique</h1>   <p class="verinfo">(PECL gearman &gt;= 0.5.0)</p><p class="refpurpose"><span class="refname">GearmanJob::unique</span> &mdash; <span class="dc-title">Get the unique identifier</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-gearmanjob.unique-description">   <h3 class="title">说明</h3>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">string</span> <span class="methodname" style="color:#CC7832"><strong>GearmanJob::unique</strong></span>     ( <span class="methodparam">void</span>    )</div>    <p class="para rdfs-comment">    Returns the unique identifiter for this job.  The identifier is assigned by the client.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-gearmanjob.unique-parameters">   <h3 class="title">参数</h3>   <span>此函数没有参数。</span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-gearmanjob.unique-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    An opaque unique identifier.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 seealso" id="refsect1-gearmanjob.unique-seealso">   <h3 class="title">参见</h3>   <span>    <ul class="simplelist">     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::do()} - Run a single task and return a result [deprecated]</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanTask::uuid()} - Get the unique identifier for a task (deprecated)</span></li>    </ul>   </span>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.gearmanjob.php">GearmanJob</a></div></div>
     * @return string An opaque unique identifier*/
    public function unique() {}

/**
*<div id="gearmanjob.workload" class="refentry">  <div class="refnamediv">   <h1 class="refname">GearmanJob::workload</h1>   <p class="verinfo">(PECL gearman &gt;= 0.5.0)</p><p class="refpurpose"><span class="refname">GearmanJob::workload</span> &mdash; <span class="dc-title">Get workload</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-gearmanjob.workload-description">   <h3 class="title">说明</h3>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">string</span> <span class="methodname" style="color:#CC7832"><strong>GearmanJob::workload</strong></span>     ( <span class="methodparam">void</span>    )</div>    <p class="para rdfs-comment">    Returns the workload for the job.  This is serialized data that is to be processed by the worker.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-gearmanjob.workload-parameters">   <h3 class="title">参数</h3>   <span>此函数没有参数。</span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-gearmanjob.workload-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    Serialized data.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 seealso" id="refsect1-gearmanjob.workload-seealso">   <h3 class="title">参见</h3>   <span>    <ul class="simplelist">     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanClient::do()} - Run a single task and return a result [deprecated]</span></li>     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanJob::workloadSize()} - Get size of work load</span></li>    </ul>   </span>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.gearmanjob.php">GearmanJob</a></div></div>
     * @return string Serialized data*/
    public function workload() {}

/**
*<div id="gearmanjob.workloadsize" class="refentry">  <div class="refnamediv">   <h1 class="refname">GearmanJob::workloadSize</h1>   <p class="verinfo">(PECL gearman &gt;= 0.5.0)</p><p class="refpurpose"><span class="refname">GearmanJob::workloadSize</span> &mdash; <span class="dc-title">Get size of work load</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-gearmanjob.workloadsize-description">   <h3 class="title">说明</h3>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">int</span> <span class="methodname" style="color:#CC7832"><strong>GearmanJob::workloadSize</strong></span>     ( <span class="methodparam">void</span>    )</div>    <p class="para rdfs-comment">    Returns the size of the job&#039;s work load (the data the worker is to process) in bytes.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-gearmanjob.workloadsize-parameters">   <h3 class="title">参数</h3>   <span>此函数没有参数。</span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-gearmanjob.workloadsize-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    The size in bytes.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 seealso" id="refsect1-gearmanjob.workloadsize-seealso">   <h3 class="title">参见</h3>   <span>    <ul class="simplelist">     <li class="member"><span class="methodname" style="color:#CC7832">{@link GearmanJob::workload()} - Get workload</span></li>    </ul>   </span>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.gearmanjob.php">GearmanJob</a></div></div>
     * @return int The size in bytes*/
    public function workloadSize() {}
}


/**
*<div id="class.gearmanexception" class="reference">   <h1 class="title">The GearmanException class</h1>     <div class="partintro"><p class="verinfo">(PECL gearman &gt;= 0.5.0)</p>     <div class="section" id="gearmanexception.intro">    <h2 class="title">简介</h2>    <p class="para">         </p>   </div>     <div class="section" id="gearmanexception.synopsis">    <h2 class="title">类摘要</h2>      <div class="classsynopsis">     <div class="ooclass"></div>       <div class="classsynopsisinfo">      <span class="ooclass">       <strong class="classname">GearmanException</strong>      </span>            <span class="ooclass">       <span class="modifier">extends</span>       <a href="http://php.net/manual/zh/class.exception.php" class="classname">Exception</a>      </span>      {</div>           <div class="classsynopsisinfo classsynopsisinfo_comment">// 继承的属性 </div>     <div class="fieldsynopsis">      <span class="modifier">protected</span>      <span class="type" style="color:#EAB766">string</span>       <var class="varname"><a href="http://php.net/manual/zh/class.exception.php#exception.props.message">$<var class="varname">message</var></a></var>     ;</div> <div class="fieldsynopsis">      <span class="modifier">protected</span>      <span class="type" style="color:#EAB766">int</span>       <var class="varname"><a href="http://php.net/manual/zh/class.exception.php#exception.props.code">$<var class="varname">code</var></a></var>     ;</div> <div class="fieldsynopsis">      <span class="modifier">protected</span>      <span class="type" style="color:#EAB766">string</span>       <var class="varname"><a href="http://php.net/manual/zh/class.exception.php#exception.props.file">$<var class="varname">file</var></a></var>     ;</div> <div class="fieldsynopsis">      <span class="modifier">protected</span>      <span class="type" style="color:#EAB766">int</span>       <var class="varname"><a href="http://php.net/manual/zh/class.exception.php#exception.props.line">$<var class="varname">line</var></a></var>     ;</div>       <div class="classsynopsisinfo classsynopsisinfo_comment">// 方法 </div>               <div class="classsynopsisinfo classsynopsisinfo_comment">// 继承的方法 </div>     <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">final</span> <span class="modifier">public</span> <span class="type" style="color:#EAB766">string</span> <span class="methodname" style="color:#CC7832">{@link Exception::getMessage}</span>     ( <span class="methodparam">void</span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">final</span> <span class="modifier">public</span> <span class="type" style="color:#EAB766">Throwable</span> <span class="methodname" style="color:#CC7832">{@link Exception::getPrevious}</span>     ( <span class="methodparam">void</span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">final</span> <span class="modifier">public</span> <span class="type" style="color:#EAB766">int</span> <span class="methodname" style="color:#CC7832">{@link Exception::getCode}</span>     ( <span class="methodparam">void</span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">final</span> <span class="modifier">public</span> <span class="type" style="color:#EAB766">string</span> <span class="methodname" style="color:#CC7832">{@link Exception::getFile}</span>     ( <span class="methodparam">void</span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">final</span> <span class="modifier">public</span> <span class="type" style="color:#EAB766">int</span> <span class="methodname" style="color:#CC7832">{@link Exception::getLine}</span>     ( <span class="methodparam">void</span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">final</span> <span class="modifier">public</span> <span class="type" style="color:#EAB766">array</span> <span class="methodname" style="color:#CC7832">{@link Exception::getTrace}</span>     ( <span class="methodparam">void</span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">final</span> <span class="modifier">public</span> <span class="type" style="color:#EAB766">string</span> <span class="methodname" style="color:#CC7832">{@link Exception::getTraceAsString}</span>     ( <span class="methodparam">void</span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">string</span>  <span class="methodname" style="color:#CC7832">{@link Exception::__toString}</span>     ( <span class="methodparam">void</span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">final</span> <span class="modifier">private</span> <span class="type" style="color:#EAB766">void</span> <span class="methodname" style="color:#CC7832">{@link Exception::__clone}</span>     ( <span class="methodparam">void</span>    )</div>      }</div>     </div>      </div>  <div class="up"><a href="http://php.net/manual/zh/book.gearman.php">Gearman</a></div></div>
*/
class GearmanException extends Exception {
    /**
     * Prop description.
     *
     * @link http://php.net/manual/en/class.gearmanexception.php#gearmanexception.props.code
     * @var $code
     */
    public $code;

}


?>
